blob: c2fa92d2e5998c10d2c5a1272d419dc385f4f66e [file] [log] [blame]
<!doctype html><html lang=en class=no-js><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=generator content="Hugo 0.102.3"><link rel=canonical type=text/html href=/docs/><link rel=alternate type=application/rss+xml href=/docs/index.xml><meta name=robots content="noindex, nofollow"><link rel="shortcut icon" href=/favicons/favicon.ico><link rel=apple-touch-icon href=/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/favicons/android-96x96.png sizes=96x96><link rel=icon type=image/png href=/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/favicons/android-192x192.png sizes=192x192><title>Documentation | HugeGraph</title><meta name=description content="Welcome to HugeGraph docs
"><meta property="og:title" content="Documentation"><meta property="og:description" content="Apache HugeGraph site"><meta property="og:type" content="website"><meta property="og:url" content="/docs/"><meta property="og:site_name" content="HugeGraph"><meta itemprop=name content="Documentation"><meta itemprop=description content="Apache HugeGraph site"><meta name=twitter:card content="summary"><meta name=twitter:title content="Documentation"><meta name=twitter:description content="Apache HugeGraph site"><link rel=preload href=/scss/main.min.14ea575cb35d93d46ff8681b2334f40fd46243c100c5c39f5a841b931fae2d40.css as=style><link href=/scss/main.min.14ea575cb35d93d46ff8681b2334f40fd46243c100c5c39f5a841b931fae2d40.css rel=stylesheet integrity><script src=https://code.jquery.com/jquery-3.5.1.min.js integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin=anonymous></script>
<link rel=stylesheet href=/css/prism.css><script type=application/javascript>var doNotTrack=!1;doNotTrack||(window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","UA-00000000-0","auto"),ga("send","pageview"))</script><script async src=https://www.google-analytics.com/analytics.js></script></head><body class=td-section><header><nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar"><a class=navbar-brand href=/><span class=navbar-logo><svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16"><defs><style>.cls-1{fill:none;stroke:#fff;stroke-miterlimit:10;stroke-width:.5px;opacity:.3}.cls-2{fill:#229efa}.cls-3{fill:#9948f7}.cls-4{fill:#33bc7a}.cls-5{fill:url(#未命名的渐变_3)}.cls-6{fill:url(#未命名的渐变_13)}.cls-7{fill:url(#未命名的渐变_11)}</style><linearGradient id="未命名的渐变_3" x1="6.16" y1="14.63" x2="6.16" y2="6.01" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2e3192"/><stop offset="0" stop-color="#229efa"/><stop offset=".44" stop-color="#239cf8"/><stop offset=".6" stop-color="#2795f2"/><stop offset=".71" stop-color="#2d8ae8"/><stop offset=".81" stop-color="#3679d9"/><stop offset=".89" stop-color="#4263c6"/><stop offset=".95" stop-color="#5048af"/><stop offset="1" stop-color="#5c319b"/></linearGradient><linearGradient id="未命名的渐变_13" x1="10.75" y1="8.2" x2="4.49" y2="1.94" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#991146"/><stop offset="0" stop-color="#326b4e"/><stop offset=".02" stop-color="#3a685c"/><stop offset=".07" stop-color="#506180"/><stop offset=".13" stop-color="#645aa0"/><stop offset=".19" stop-color="#7554bc"/><stop offset=".26" stop-color="#8250d2"/><stop offset=".35" stop-color="#8d4ce3"/><stop offset=".45" stop-color="#944aee"/><stop offset=".6" stop-color="#9848f5"/><stop offset="1" stop-color="#9948f7"/></linearGradient><linearGradient id="未命名的渐变_11" x1="15.34" y1="6.67" x2="7.88" y2="10.98" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#33bc7a"/><stop offset=".45" stop-color="#32ba7a"/><stop offset=".61" stop-color="#2fb37c"/><stop offset=".73" stop-color="#29a87e"/><stop offset=".82" stop-color="#219782"/><stop offset=".9" stop-color="#168186"/><stop offset=".97" stop-color="#09668b"/><stop offset="1" stop-color="#03598e"/></linearGradient></defs><title>logo</title><rect class="cls-1" x="-143.14" y="-373.46" width="597.8" height="424.44"/><circle class="cls-2" cx="12.02" cy="1.83" r="1.33"/><circle class="cls-3" cx="12.02" cy="14.17" r="1.33"/><circle class="cls-4" cx="1.33" cy="8" r="1.33"/><path class="cls-5" d="M7.91 10h0a2.65 2.65.0 01-.23-3.74A1.75 1.75.0 017.91 6h0A2.66 2.66.0 014.4 6h0a1.81 1.81.0 01.24.24A2.65 2.65.0 014.4 10h0a2.62 2.62.0 00-.89 2 2.65 2.65.0 104.4-2z"/><path class="cls-6" d="M12.19 5.49a2.78 2.78.0 01-.5.11A2.64 2.64.0 018.76 3.5h0a2.65 2.65.0 10-2.6 3.17A2.6 2.6.0 007 6.53H7a2.65 2.65.0 013.44 2 2.94 2.94.0 010-.51 2.65 2.65.0 011.75-2.53z"/><path class="cls-7" d="M13 5.35a2.64 2.64.0 00-2.59 2.12h0a3 3 0 01-.08.32A2.65 2.65.0 017.54 9.58a2.86 2.86.0 00.37.41h0a2.63 2.63.0 01.9 2 2.84 2.84.0 01-.05.51 2.64 2.64.0 013.12-2.06l.32.08h0a2.6 2.6.0 00.84.14 2.65 2.65.0 100-5.3z"/></svg></span><span class=font-weight-bold>HugeGraph</span></a><div class="td-navbar-nav-scroll ml-md-auto" id=main_navbar><ul class="navbar-nav mt-2 mt-lg-0"><li class="nav-item mr-4 mb-2 mb-lg-0"><a class="nav-link active" href=/docs/><i class='fas fa-book pr-2'></i><span class=active>Documentation</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=https://github.com/apache/incubator-hugegraph target=_blank><i class='fab fa-github pr-2'></i><span>GitHub</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/docs/download/download/><i class='fas fa-download pr-2'></i><span>Download</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/community/><span>Community</span></a></li><li class="nav-item dropdown mr-4 d-none d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>English</a><div class=dropdown-menu aria-labelledby=navbarDropdownMenuLink><a class=dropdown-item href=/cn/docs/>中文</a></div></li></ul></div><div class="navbar-nav d-none d-lg-block"></div></nav></header><div class="container-fluid td-outer"><div class=td-main><div class="row flex-xl-nowrap"><main class="col-12 col-md-9 col-xl-8 pl-md-5" role=main><div class=td-content><div class="pageinfo pageinfo-primary d-print-none"><p>This is the multi-page printable view of this section.
<a href=# onclick="return print(),!1">Click here to print</a>.</p><p><a href=/docs/>Return to the regular view of this page</a>.</p></div><h1 class=title>Documentation</h1><ul><li>1: <a href=#pg-7dd24b6126e5b249f96de862bfc51025>Introduction with HugeGraph</a></li><li>2: <a href=#pg-64d47cfe1880443239e7c31f8fd1ac1a>Download Apache HugeGraph (Incubating)</a></li><li>3: <a href=#pg-08b1b69f6319108b0455d24614fdd660>Quick Start</a></li><ul><li>3.1: <a href=#pg-8ec2ee5fd8ff8e48255d55eab65d92b6>HugeGraph-Server Quick Start</a></li><li>3.2: <a href=#pg-685a02f8811d86f1ce195d7c73d9ea44>HugeGraph-Loader Quick Start</a></li><li>3.3: <a href=#pg-751ed124ec6dbb96d5e65c62dc9d4e85>HugeGraph-Hubble Quick Start</a></li><li>3.4: <a href=#pg-9cbf1b01e876dc8cdc2da1c17759eed3>HugeGraph-Client Quick Start</a></li><li>3.5: <a href=#pg-405910066a042ce44a1c5798042ab119>HugeGraph-AI Quick Start</a></li><li>3.6: <a href=#pg-06d4cae527789fcda01ebf4e48c6559f>HugeGraph-Tools Quick Start</a></li><li>3.7: <a href=#pg-e68a801476ae8ef5e45c79949a3a5e44>HugeGraph-Computer Quick Start</a></li></ul><li>4: <a href=#pg-5074334c73aa450364a31470231ebff8>Config</a></li><ul><li>4.1: <a href=#pg-af7e8f1dc385b255c4f38b3cbafe224a>HugeGraph configuration</a></li><li>4.2: <a href=#pg-6bfbb2db4e1f281942d741cef305e724>HugeGraph Config Options</a></li><li>4.3: <a href=#pg-7d189549d4201521c83e0d93a2474a2d>Built-in User Authentication and Authorization Configuration and Usage in HugeGraph</a></li><li>4.4: <a href=#pg-7e400260398a18d0be72b1fe5a73f419>Configuring HugeGraphServer to Use HTTPS Protocol</a></li><li>4.5: <a href=#pg-b22c66aa61d3c6e047af8286d3b5f445>HugeGraph-Computer Config</a></li></ul><li>5: <a href=#pg-8f8368cdf9ec684d30761c6d28a34179>API</a></li><ul><li>5.1: <a href=#pg-a809bf70d5493b5046619919800e4de6>HugeGraph RESTful API</a></li><ul><li>5.1.1: <a href=#pg-698c3217de07a8cb0dc0e93dbae29ee9>Schema API</a></li><li>5.1.2: <a href=#pg-f7f4b3b6f4b7a965f8c30675df8e56f8>PropertyKey API</a></li><li>5.1.3: <a href=#pg-28cb205879be97a55ddc8cd365c4438e>VertexLabel API</a></li><li>5.1.4: <a href=#pg-41864d99c39fc7040549f6eaf5441daf>EdgeLabel API</a></li><li>5.1.5: <a href=#pg-7099742fb947ad5dfde9e72216c10b8a>IndexLabel API</a></li><li>5.1.6: <a href=#pg-bde129922f801ad9560757fcec64d05c>Rebuild API</a></li><li>5.1.7: <a href=#pg-86bf520fd6b098231f4af6590328e871>Vertex API</a></li><li>5.1.8: <a href=#pg-f40127b155ddd802d50c507ff1cf5530>Edge API</a></li><li>5.1.9: <a href=#pg-f0adc653be0b454ce1952bdaf0afefa6>Traverser API</a></li><li>5.1.10: <a href=#pg-ced5167413a6606a537e40b18f6fec3e>Rank API</a></li><li>5.1.11: <a href=#pg-32aff6fa72d51caa846c2a72e5771c5d>Variable API</a></li><li>5.1.12: <a href=#pg-3d75cf337650cd90a617c3ef7e9dca87>Graphs API</a></li><li>5.1.13: <a href=#pg-d9de752e44e3a8a709d187e4101fd818>Task API</a></li><li>5.1.14: <a href=#pg-e84b0f106294b580ca64918b72cc71d1>Gremlin API</a></li><li>5.1.15: <a href=#pg-f7fe8b1685038d0062b4c806247e1db4>Cypher API</a></li><li>5.1.16: <a href=#pg-a3b125f257052209fcb98300d5c066a7>Authentication API</a></li><li>5.1.17: <a href=#pg-db6682f721f1c345d19274e452d1d3d3>Metrics API</a></li><li>5.1.18: <a href=#pg-8e126d4f2f7317a1268d7edb65cd4fcc>Other API</a></li></ul><li>5.2: <a href=#pg-3457a7585a93814fdbb1a44b68edc0d3>HugeGraph Java Client</a></li><li>5.3: <a href=#pg-1ebf9ecb86d8a6b8536fd581e696ce8c>Gremlin-Console</a></li></ul><li>6: <a href=#pg-d2c6535126cca927d2a9c893abde92a0>GUIDES</a></li><ul><li>6.1: <a href=#pg-dcb89d888ea6f4146ace522d76fe2776>HugeGraph Architecture Overview</a></li><li>6.2: <a href=#pg-3d0f9ef831ef5d7d11acfb09140359fa>HugeGraph Design Concepts</a></li><li>6.3: <a href=#pg-96a920d19e01666d95eded506d502ab4>HugeGraph Plugin mechanism and plug-in extension process</a></li><li>6.4: <a href=#pg-2c9db416c8d78f898d52c91ec12535d4>Backup and Restore</a></li><li>6.5: <a href=#pg-3465b699399f48689cdc6b5e59a10d69>FAQ</a></li><li>6.6: <a href=#pg-d54c862d45861ca39a945d90325e3909>Security Report</a></li></ul><li>7: <a href=#pg-3ed7a32fc6a58bb9d03dcd00dc874ba8>QUERY LANGUAGE</a></li><ul><li>7.1: <a href=#pg-2696905b5b6cbdf2ad7f78085bd6baa9>HugeGraph Gremlin</a></li><li>7.2: <a href=#pg-29164f631ea2ad7e883c0ba00a843508>HugeGraph Examples</a></li></ul><li>8: <a href=#pg-f0a22a813c843322c0d360d952e434ce>PERFORMANCE</a></li><ul><li>8.1: <a href=#pg-63f6d63db3ee3a5270fc1ca0a0c0e181>HugeGraph BenchMark Performance</a></li><li>8.2: <a href=#pg-699ebe5daed825049424b7539aad30f9>HugeGraph-API Performance</a></li><ul><li>8.2.1: <a href=#pg-dbfafc29a5e930415f78f72c47ee67f2>v0.5.6 Stand-alone(RocksDB)</a></li><li>8.2.2: <a href=#pg-fd5b165e28a07f1c35ab177b10e15dc8>v0.5.6 Cluster(Cassandra)</a></li></ul><li>8.3: <a href=#pg-8e73cd18ae7e460700391440de46c404>HugeGraph-Loader Performance</a></li><li>8.4: <a href=#pg-0b6ebbdbce17d47f26fcb874226e5edc></a></li></ul><li>9: <a href=#pg-99a93ef9534d11fef4be3e4b3b1a6381>Contribution Guidelines</a></li><ul><li>9.1: <a href=#pg-17ea1d6a1e6627d08a7d6f4d2898cca1>How to Contribute to HugeGraph</a></li><li>9.2: <a href=#pg-dc89ef117bed0b0ef3c6487f9a6a8bd0>Subscribe Mailing Lists</a></li><li>9.3: <a href=#pg-07536ba8fd0a4ba5975f821978cf0009>Validate Apache Release</a></li><li>9.4: <a href=#pg-c89774a4e231af418639f53a926ea188>Setup Server in IDEA (Dev)</a></li><li>9.5: <a href=#pg-e1fc3666faccec72ead94a2ed6a9f8a3>Apache HugeGraph Committer Guide</a></li></ul><li>10: <a href=#pg-d9ec0777c4f7a8a41476a65f2ecca6f7>CHANGELOGS</a></li><ul><li>10.1: <a href=#pg-e45a1f0eaa721babce18f07eaf5fc437>HugeGraph 1.0.0 Release Notes</a></li><li>10.2: <a href=#pg-683dacb0fb9a0e0d70537cae5afdb7cf>HugeGraph 1.2.0 Release Notes</a></li><li>10.3: <a href=#pg-cc8446bbcef27957e4ec28e70811ad2f>HugeGraph 1.3.0 Release Notes</a></li></ul><li>11: <a href=#pg-01c617939d9e21dc19567e8753d6fd3b></a></li><li>12: <a href=#pg-a395eab4dc054c73b0174216cfbeaf1a></a></li></ul><div class=content><p>Welcome to HugeGraph docs</p></div></div><div class=td-content><h1 id=pg-7dd24b6126e5b249f96de862bfc51025>1 - Introduction with HugeGraph</h1><h3 id=summary>Summary</h3><p>Apache HugeGraph is an easy-to-use, efficient, general-purpose open source graph database system
(Graph Database, <a href=https://github.com/hugegraph/hugegraph>GitHub project address</a>), implemented the <a href=https://tinkerpop.apache.org>Apache TinkerPop3</a> framework and is fully compatible with the <a href=https://tinkerpop.apache.org/gremlin.html>Gremlin</a> query language,
With complete toolchain components, it helps users easily build applications and products based on graph databases. HugeGraph supports fast import of more than 10 billion vertices and edges, and provides millisecond-level relational query capability (OLTP).
It supports large-scale distributed graph computing (OLAP).</p><p>Typical application scenarios of HugeGraph include deep relationship exploration, association analysis, path search, feature extraction, data clustering, community detection, knowledge graph, etc., and are applicable to business fields such as network security, telecommunication fraud, financial risk control, advertising recommendation, social network, and intelligence Robots, etc.</p><h3 id=features>Features</h3><p>HugeGraph supports graph operations in online and offline environments, supports batch import of data, supports efficient complex relationship analysis, and can be seamlessly integrated with big data platforms.
HugeGraph supports multi-user parallel operations. Users can enter Gremlin query statements and get graph query results in time. They can also call HugeGraph API in user programs for graph analysis or query.</p><p>This system has the following features:</p><ul><li>Ease of use: HugeGraph supports Gremlin graph query language and RESTful API, provides common interfaces for graph retrieval, and has peripheral tools with complete functions to easily implement various graph-based query and analysis operations.</li><li>Efficiency: HugeGraph has been deeply optimized in graph storage and graph computing, and provides a variety of batch import tools, which can easily complete the rapid import of tens of billions of data, and achieve millisecond-level response for graph retrieval through optimized queries. Supports simultaneous online real-time operations of thousands of users.</li><li>Universal: HugeGraph supports the Apache Gremlin standard graph query language and the Property Graph standard graph modeling method, and supports graph-based OLTP and OLAP schemes. Integrate Apache Hadoop and Apache Spark big data platforms.</li><li>Scalable: supports distributed storage, multiple copies of data, and horizontal expansion, built-in multiple back-end storage engines, and can easily expand the back-end storage engine through plug-ins.</li><li>Open: HugeGraph code is open source (Apache 2 License), customers can modify and customize independently, and selectively give back to the open-source community.</li></ul><p>The functions of this system include but are not limited to:</p><ul><li>Supports batch import of data from multiple data sources (including local files, HDFS files, MySQL databases, and other data sources), and supports import of multiple file formats (including TXT, CSV, JSON, and other formats)</li><li>With a visual operation interface, it can be used for operation, analysis, and display diagrams, reducing the threshold for users to use</li><li>Optimized graph interface: shortest path (Shortest Path), K-step connected subgraph (K-neighbor), K-step to reach the adjacent point (K-out), personalized recommendation algorithm PersonalRank, etc.</li><li>Implemented based on Apache TinkerPop3 framework, supports Gremlin graph query language</li><li>Support attribute graph, attributes can be added to vertices and edges, and support rich attribute types</li><li>Has independent schema metadata information, has powerful graph modeling capabilities, and facilitates third-party system integration</li><li>Support multi-vertex ID strategy: support primary key ID, support automatic ID generation, support user-defined string ID, support user-defined digital ID</li><li>The attributes of edges and vertices can be indexed to support precise query, range query, and full-text search</li><li>The storage system adopts a plug-in method, supporting RocksDB (standalone/cluster), Cassandra, ScyllaDB, HBase, MySQL, PostgreSQL, Palo and Memory, etc.</li><li>Integrated with big data systems such as HDFS, Spark/Flink, GraphX, etc., supports BulkLoad operation to import massive data.</li><li>Supports HA(high availability), multiple data replicas, backup and recovery, monitoring, distributed Trace, etc.</li></ul><h3 id=modules>Modules</h3><ul><li><a href=/docs/quickstart/hugegraph-server>HugeGraph-Server</a>: HugeGraph-Server is the core part of the HugeGraph project, containing Core, Backend, API and other submodules;<ul><li>Core: Implements the graph engine, connects to the Backend module downwards, and supports the API module upwards;</li><li>Backend: Implements the storage of graph data to the backend, supports backends including: Memory, Cassandra, ScyllaDB, RocksDB, HBase, MySQL and PostgreSQL, users can choose one according to the actual situation;</li><li>API: Built-in REST Server, provides RESTful API to users, and is fully compatible with Gremlin queries. (Supports distributed storage and computation pushdown)</li></ul></li><li><a href=https://github.com/apache/hugegraph-toolchain>HugeGraph-Toolchain</a>: (Toolchain)<ul><li><a href=/docs/quickstart/hugegraph-client>HugeGraph-Client</a>: HugeGraph-Client provides a RESTful API client for connecting to HugeGraph-Server, currently only the Java version is implemented, users of other languages can implement it themselves;</li><li><a href=/docs/quickstart/hugegraph-loader>HugeGraph-Loader</a>: HugeGraph-Loader is a data import tool based on HugeGraph-Client, which transforms ordinary text data into vertices and edges of the graph and inserts them into the graph database;</li><li><a href=/docs/quickstart/hugegraph-hubble>HugeGraph-Hubble</a>: HugeGraph-Hubble is HugeGraph&rsquo;s Web
visualization management platform, a one-stop visualization analysis platform, the platform covers the whole process from data modeling, to fast data import, to online and offline analysis of data, and unified management of the graph;</li><li><a href=/docs/quickstart/hugegraph-tools>HugeGraph-Tools</a>: HugeGraph-Tools is HugeGraph&rsquo;s deployment and management tool, including graph management, backup/recovery, Gremlin execution and other functions.</li></ul></li><li><a href=/docs/quickstart/hugegraph-computer>HugeGraph-Computer</a>: HugeGraph-Computer is a distributed graph processing system (OLAP).
It is an implementation of <a href=https://kowshik.github.io/JPregel/pregel_paper.pdf>Pregel</a>. It can run on clusters such as Kubernetes/Yarn, and supports large-scale graph computing.</li><li><a href=/docs/quickstart/hugegraph-ai>HugeGraph-AI</a>: HugeGraph-AI is HugeGraph&rsquo;s independent AI
component, providing training and inference functions of graph neural networks, LLM/Graph RAG combination/Python-Client and other related components, continuously updating.</li></ul><h3 id=contact-us>Contact Us</h3><ul><li><a href=https://github.com/apache/incubator-hugegraph/issues>GitHub Issues</a>: Feedback on usage issues and functional requirements (quick response)</li><li>Feedback Email: <a href=mailto:dev@hugegraph.apache.org>dev@hugegraph.apache.org</a> (<a href=https://hugegraph.apache.org/docs/contribution-guidelines/subscribe/>subscriber</a> only)</li><li>Security Email: <a href=mailto:security@hugegraph.apache.org>security@hugegraph.apache.org</a> (Report SEC problems)</li><li>WeChat public account: Apache HugeGraph, welcome to scan this QR code to follow us.</li></ul><img src="https://github.com/apache/hugegraph-doc/blob/master/assets/images/wechat.png?raw=true" alt="QR png" width=300></div><div class=td-content style=page-break-before:always><h1 id=pg-64d47cfe1880443239e7c31f8fd1ac1a>2 - Download Apache HugeGraph (Incubating)</h1><blockquote><p>Instructions:</p><ul><li>It is recommended to use the latest version of the HugeGraph software package. Please select Java11 for the runtime environment.</li><li>To verify downloads, use the corresponding hash (SHA512), signature, and <a href=https://downloads.apache.org/incubator/hugegraph/KEYS>Project Signature Verification KEYS</a>.</li><li>Instructions for checking hash (SHA512) and signatures are on the <a href=/docs/contribution-guidelines/validate-release/>Validate Release</a> page, and you can also refer to <a href=https://www.apache.org/dyn/closer.cgi#verify>ASF official instructions</a>.</li></ul></blockquote><blockquote><p>Note: The version numbers of all components of HugeGraph have been kept consistent, and the version numbers of Maven repositories such as <code>client/loader/hubble/common</code> are the same. You can refer to these for dependency references <a href=https://github.com/apache/incubator-hugegraph-toolchain#maven-dependencies>maven example</a>.</p></blockquote><h3 id=latest-version-130>Latest Version 1.3.0</h3><ul><li>Release Date: 2024-04-01</li><li><a href=/docs/changelog/hugegraph-1.3.0-release-notes/>Release Notes</a></li></ul><h4 id=binary-packages>Binary Packages</h4><table><thead><tr><th>Server</th><th>Toolchain</th></tr></thead><tbody><tr><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.3.0/apache-hugegraph-incubating-1.3.0.tar.gz?action=download">Binary</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-incubating-1.3.0.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-incubating-1.3.0.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.3.0/apache-hugegraph-toolchain-incubating-1.3.0.tar.gz?action=download">Binary</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-toolchain-incubating-1.3.0.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-toolchain-incubating-1.3.0.tar.gz.sha512>SHA512</a>]</td></tr></tbody></table><h4 id=source-packages>Source Packages</h4><p>Please refer to <a href=/docs/quickstart/hugegraph-server/>build from source</a>.</p><table><thead><tr><th>Server</th><th>Toolchain</th><th>AI</th><th>Common</th></tr></thead><tbody><tr><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.3.0/apache-hugegraph-incubating-1.3.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-incubating-1.3.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-incubating-1.3.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.3.0/apache-hugegraph-toolchain-incubating-1.3.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-toolchain-incubating-1.3.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-toolchain-incubating-1.3.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.3.0/apache-hugegraph-ai-incubating-1.3.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-ai-incubating-1.3.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-ai-incubating-1.3.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.3.0/apache-hugegraph-commons-incubating-1.3.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-commons-incubating-1.3.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-commons-incubating-1.3.0-src.tar.gz.sha512>SHA512</a>]</td></tr></tbody></table><hr><h3 id=archived-versions>Archived Versions</h3><blockquote><p>Note: <code>1.3.0</code> is the last major version compatible with Java8, please switch to or migrate to Java11 as soon as possible (lower versions of Java have potentially more SEC risks and performance impacts).</p></blockquote><h4 id=120>1.2.0</h4><ul><li>Release Date: 2023-12-28</li><li><a href=/docs/changelog/hugegraph-1.2.0-release-notes/>Release Notes</a></li></ul><h5 id=binary-packages-1>Binary Packages</h5><table><thead><tr><th>Server</th><th>Toolchain</th></tr></thead><tbody><tr><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.2.0/apache-hugegraph-incubating-1.2.0.tar.gz?action=download">Binary</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-incubating-1.2.0.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-incubating-1.2.0.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.2.0/apache-hugegraph-toolchain-incubating-1.2.0.tar.gz?action=download">Binary</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-toolchain-incubating-1.2.0.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-toolchain-incubating-1.2.0.tar.gz.sha512>SHA512</a>]</td></tr></tbody></table><h5 id=source-packages-1>Source Packages</h5><table><thead><tr><th>Server</th><th>Toolchain</th><th>Computer</th><th>Common</th></tr></thead><tbody><tr><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.2.0/apache-hugegraph-incubating-1.2.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-incubating-1.2.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-incubating-1.2.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.2.0/apache-hugegraph-toolchain-incubating-1.2.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-toolchain-incubating-1.2.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-toolchain-incubating-1.2.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.2.0/apache-hugegraph-computer-incubating-1.2.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-computer-incubating-1.2.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-computer-incubating-1.2.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.2.0/apache-hugegraph-commons-incubating-1.2.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-commons-incubating-1.2.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.2.0/apache-hugegraph-commons-incubating-1.2.0-src.tar.gz.sha512>SHA512</a>]</td></tr></tbody></table><h4 id=100>1.0.0</h4><ul><li>Release Date: 2023-02-22</li><li><a href=/docs/changelog/hugegraph-1.0.0-release-notes/>Release Notes</a></li></ul><h5 id=binary-packages-2>Binary Packages</h5><table><thead><tr><th>Server</th><th>Toolchain</th><th>Computer</th></tr></thead><tbody><tr><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.0.0/apache-hugegraph-incubating-1.0.0.tar.gz?action=download">Binary</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-incubating-1.0.0.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-incubating-1.0.0.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0.tar.gz?action=download">Binary</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.0.0/apache-hugegraph-computer-incubating-1.0.0.tar.gz?action=download">Binary</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-computer-incubating-1.0.0.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-computer-incubating-1.0.0.tar.gz.sha512>SHA512</a>]</td></tr></tbody></table><h5 id=source-packages-2>Source Packages</h5><table><thead><tr><th>Server</th><th>Toolchain</th><th>Computer</th><th>Common</th></tr></thead><tbody><tr><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.0.0/apache-hugegraph-incubating-1.0.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-incubating-1.0.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-incubating-1.0.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.0.0/apache-hugegraph-computer-incubating-1.0.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-computer-incubating-1.0.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-computer-incubating-1.0.0-src.tar.gz.sha512>SHA512</a>]</td><td>[<a href="https://www.apache.org/dyn/closer.lua/incubator/hugegraph/1.0.0/apache-hugegraph-commons-incubating-1.0.0-src.tar.gz?action=download">Source</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-commons-incubating-1.0.0-src.tar.gz.asc>Sign</a>] [<a href=https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-commons-incubating-1.0.0-src.tar.gz.sha512>SHA512</a>]</td></tr></tbody></table></div><div class=td-content style=page-break-before:always><h1 id=pg-08b1b69f6319108b0455d24614fdd660>3 - Quick Start</h1></div><div class=td-content><h1 id=pg-8ec2ee5fd8ff8e48255d55eab65d92b6>3.1 - HugeGraph-Server Quick Start</h1><h3 id=1-hugegraph-server-overview>1 HugeGraph-Server Overview</h3><p><code>HugeGraph-Server</code> is the core part of the HugeGraph Project, contains submodules such as Core, Backend, API.</p><p>The Core Module is an implementation of the Tinkerpop interface; The Backend module is used to save the graph data to the data store, currently supported backends include: Memory, Cassandra, ScyllaDB, RocksDB; The API Module provides HTTP Server, which converts Client&rsquo;s HTTP request into a call to Core Module.</p><blockquote><p>There will be two spellings HugeGraph-Server and HugeGraphServer in the document, and other
modules are similar. There is no big difference in the meaning of these two ways,
which can be distinguished as follows: <code>HugeGraph-Server</code> represents the code of server-related
components, <code>HugeGraphServer</code> represents the service process.</p></blockquote><h3 id=2-dependency-for-buildingrunning>2 Dependency for Building/Running</h3><h4 id=21-install-java-11-jdk-11>2.1 Install Java 11 (JDK 11)</h4><p>Consider using Java 11 to run <code>HugeGraph-Server</code> (compatible with Java 8 before 1.5.0),
and configure by yourself.</p><p><strong>Be sure to execute the <code>java -version</code> command to check the jdk version before reading</strong></p><blockquote><p>Note: Using Java8 will lose some security guarantees, we recommend using Java11 in production or</p><p>environments exposed to the public network and enable <a href=/docs/config/config-authentication/>Auth authentication</a>.</p></blockquote><h3 id=3-deploy>3 Deploy</h3><p>There are four ways to deploy HugeGraph-Server components:</p><ul><li>Method 1: Use Docker container (Convenient for Test/Dev)</li><li>Method 2: Download the binary tarball</li><li>Method 3: Source code compilation</li><li>Method 4: One-click deployment</li></ul><h4 id=31-use-docker-container-convenient-for-testdev>3.1 Use Docker container (Convenient for Test/Dev)</h4><p>You can refer to <a href=https://hub.docker.com/r/hugegraph/hugegraph>Docker deployment guide</a>.</p><p>We can use <code>docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph</code> to quickly start an inner <code>HugeGraph server</code> with <code>RocksDB</code> in background.</p><p>Optional:</p><ol><li>use <code>docker exec -it graph bash</code> to enter the container to do some operations.</li><li>use <code>docker run -itd --name=graph -p 8080:8080 -e PRELOAD="true" hugegraph/hugegraph</code> to start with a <strong>built-in</strong> example graph. We can use <code>RESTful API</code> to verify the result. The detailed step can refer to <a href=#517-create-an-example-graph-when-startup>5.1.7</a></li><li>use <code>-e PASSWORD=123456</code> to enable auth mode and set the passoword for admin. You cna find more details from <a href=/docs/config/config-authentication#Use-docker-to-enble-authentication-mode>Config Authentication</a></li></ol><p>If you use docker desktop, you can set the option like:</p><div style=text-align:center><img src=/docs/images/images-server/31docker-option.jpg alt=image style=width:33%></div><p>Also, if we want to manage the other Hugegraph related instances in one file, we can use <code>docker-compose</code> to deploy, with the command <code>docker-compose up -d</code> (you can config only <code>server</code>). Here is an example <code>docker-compose.yml</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#204a87;font-weight:700>version</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#39;3&#39;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>services</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>server</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hugegraph</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>server</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># environment:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># - PRELOAD=true</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># PRELOAD is a option to preload a build-in sample graph when initializing.</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># - PASSWORD=123456</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># PASSWORD is an option to enable auth mode with the password you set.</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>8080</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8080</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><blockquote><p>Note:</p><ol><li><p>The docker image of hugegraph is a convenience release to start hugegraph quickly, but not <strong>official distribution</strong> artifacts. You can find more details from <a href=https://infra.apache.org/release-distribution.html#dockerhub>ASF Release Distribution Policy</a>.</p></li><li><p>Recommand to use <code>release tag</code>(like <code>1.3.0</code>) for the stable version. Use <code>latest</code> tag to experience the newest functions in development.</p></li></ol></blockquote><h4 id=32-download-the-binary-tar-tarball>3.2 Download the binary tar tarball</h4><p>You could download the binary tarball from the download page of ASF site like this:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># use the latest version, here is 1.3.0 for example</span>
</span></span><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>/apache-hugegraph-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz
</span></span><span style=display:flex><span>tar zxf *hugegraph*.tar.gz
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># (Optional) verify the integrity with SHA512 (recommended)</span>
</span></span><span style=display:flex><span>shasum -a <span style=color:#0000cf;font-weight:700>512</span> apache-hugegraph-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz
</span></span><span style=display:flex><span>curl https://downloads.apache.org/incubator/hugegraph/<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>/apache-hugegraph-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz.sha512
</span></span></code></pre></div><h4 id=33-source-code-compilation>3.3 Source code compilation</h4><p>Please ensure that the wget command is installed before compiling the source code</p><p>We could get HugeGraph <strong>source code</strong> by 2 ways: (So as the other HugeGraph repos/modules)</p><ul><li>download the stable/release version from the ASF site</li><li>clone the unstable/latest version by GitBox(ASF) or GitHub</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Way 1. download release package from the ASF site</span>
</span></span><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>/apache-hugegraph-incubating-src-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz
</span></span><span style=display:flex><span>tar zxf *hugegraph*.tar.gz
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># (Optional) verify the integrity with SHA512 (recommended)</span>
</span></span><span style=display:flex><span>shasum -a <span style=color:#0000cf;font-weight:700>512</span> apache-hugegraph-incubating-src-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz
</span></span><span style=display:flex><span>curl https://downloads.apache.org/incubator/hugegraph/<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>/apache-hugegraph-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>-src.tar.gz.sha512
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Way2 : clone the latest code by git way (e.g GitHub)</span>
</span></span><span style=display:flex><span>git clone https://github.com/apache/hugegraph.git
</span></span></code></pre></div><p>Compile and generate tarball</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> *hugegraph
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># (Optional) use &#34;-P stage&#34; param if you build failed with the latest code(during pre-release period)</span>
</span></span><span style=display:flex><span>mvn package -DskipTests -ntp
</span></span></code></pre></div><p>The execution log is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>......
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> Reactor Summary <span style=color:#204a87;font-weight:700>for</span> hugegraph 1.3.0:
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph .......................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 2.405 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-core ..................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 13.405 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-api ...................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 25.943 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-cassandra ................................ SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 54.270 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-scylladb ................................. SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 1.032 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-rocksdb .................................. SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 34.752 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-mysql .................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 1.778 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-palo ..................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 1.070 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-hbase .................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 32.124 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-postgresql ............................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 1.823 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-dist ..................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 17.426 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-example .................................. SUCCESS <span style=color:#ce5c00;font-weight:700>[</span> 1.941 s<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> hugegraph-test ..................................... SUCCESS <span style=color:#ce5c00;font-weight:700>[</span>01:01 min<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> ------------------------------------------------------------------------
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> BUILD SUCCESS
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> ------------------------------------------------------------------------
</span></span><span style=display:flex><span>......
</span></span></code></pre></div><p>After successful execution, <code>*hugegraph-*.tar.gz</code> files will be generated in the hugegraph directory, which is the tarball generated by compilation.</p><h4 id=34-one-click-deployment>3.4 One-click deployment</h4><p><code>HugeGraph-Tools</code> provides a command-line tool for one-click deployment, users can use this tool to quickly download, decompress, configure and start <code>HugeGraphServer</code> and <code>HugeGraph-Hubble</code> with one click.</p><p>Of course, you should download the tarball of <code>HugeGraph-Toolchain</code> first.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># download toolchain binary package, it includes loader + tool + hubble</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># please check the latest version (e.g. here is 1.3.0)</span>
</span></span><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/1.3.0/apache-hugegraph-toolchain-incubating-1.3.0.tar.gz
</span></span><span style=display:flex><span>tar zxf *hugegraph-*.tar.gz
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># enter the tool&#39;s package</span>
</span></span><span style=display:flex><span><span style=color:#204a87>cd</span> *hugegraph*/*tool*
</span></span></code></pre></div><blockquote><p>note: <code>${version}</code> is the version, The latest version can refer to <a href=/docs/download/download>Download Page</a>, or click the link to download directly from the Download page</p></blockquote><p>The general entry script for HugeGraph-Tools is <code>bin/hugegraph</code>, Users can use the <code>help</code> command to view its usage, here only the commands for one-click deployment are introduced.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/hugegraph deploy -v <span style=color:#ce5c00;font-weight:700>{</span>hugegraph-version<span style=color:#ce5c00;font-weight:700>}</span> -p <span style=color:#ce5c00;font-weight:700>{</span>install-path<span style=color:#ce5c00;font-weight:700>}</span> <span style=color:#ce5c00;font-weight:700>[</span>-u <span style=color:#ce5c00;font-weight:700>{</span>download-path-prefix<span style=color:#ce5c00;font-weight:700>}]</span>
</span></span></code></pre></div><p><code>{hugegraph-version}</code> indicates the version of HugeGraphServer and HugeGraphStudio to be deployed, users can view the <code>conf/version-mapping.yaml</code> file for version information, <code>{install-path}</code> specify the installation directory of HugeGraphServer and HugeGraphStudio, <code>{download-path-prefix}</code> optional, specify the download address of HugeGraphServer and HugeGraphStudio tarball, use default download URL if not provided, for example, to start HugeGraph-Server and HugeGraphStudio version 0.6, write the above command as <code>bin/hugegraph deploy -v 0.6 -p services</code>.</p><h3 id=4-config>4 Config</h3><p>If you need to quickly start HugeGraph just for testing, then you only need to modify a few configuration items (see next section).
for detailed configuration introduction, please refer to <a href=/docs/config/config-guide>configuration document</a> and <a href=/docs/config/config-option>introduction to configuration items</a></p><h3 id=5-startup>5 Startup</h3><h4 id=51-use-a-startup-script-to-startup>5.1 Use a startup script to startup</h4><p>The startup is divided into &ldquo;first startup&rdquo; and &ldquo;non-first startup.&rdquo; This distinction is because the back-end database needs to be initialized before the first startup, and then the service is started.
after the service is stopped artificially, or when the service needs to be started again for other reasons, because the backend database is persistent, you can start the service directly.</p><p>When HugeGraphServer starts, it will connect to the backend storage and try to check the version number of the backend storage. If the backend is not initialized or the backend has been initialized but the version does not match (old version data), HugeGraphServer will fail to start and give an error message.</p><p>If you need to access HugeGraphServer externally, please modify the <code>restserver.url</code> configuration item of <code>rest-server.properties</code>
(default is <code>http://127.0.0.1:8080</code>), change to machine name or IP address.</p><p>Since the configuration (hugegraph.properties) and startup steps required by various backends are slightly different, the following will introduce the configuration and startup of each backend one by one.</p><p>If you want to use HugeGraph authentication mode, you should follow the <a href=https://hugegraph.apache.org/docs/config/config-authentication/>Server Authentication Configuration</a> before you start Server later.</p><h5 id=511-memory>5.1.1 Memory</h5><details><summary>Click to expand/collapse Memory configuration and startup methods</summary><p>Update hugegraph.properties</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=memory
</span></span><span style=display:flex><span>serializer=text
</span></span></code></pre></div><blockquote><p>The data of the Memory backend is stored in memory and cannot be persisted. It does not need to initialize the backend. This is the only backend that does not require initialization.</p></blockquote><p>Start server</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hugegraph.sh
</span></span><span style=display:flex><span>Starting HugeGraphServer...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer <span style=color:#ce5c00;font-weight:700>(</span>http://127.0.0.1:8080/graphs<span style=color:#ce5c00;font-weight:700>)</span>....OK
</span></span></code></pre></div><p>The prompted url is the same as the restserver.url configured in rest-server.properties</p></details><h5 id=512-rocksdb>5.1.2 RocksDB</h5><details><summary>Click to expand/collapse RocksDB configuration and startup methods</summary><blockquote><p>RocksDB is an embedded database that does not require manual installation and deployment. GCC version >= 4.3.0 (GLIBCXX_3.4.10) is required. If not, GCC needs to be upgraded in advance</p></blockquote><p>Update hugegraph.properties</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=rocksdb
</span></span><span style=display:flex><span>serializer=binary
</span></span><span style=display:flex><span>rocksdb.data_path=.
</span></span><span style=display:flex><span>rocksdb.wal_path=.
</span></span></code></pre></div><p>Initialize the database (required on first startup or a new configuration was manually added under &lsquo;conf/graphs/&rsquo;)</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> *hugegraph-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>
</span></span><span style=display:flex><span>bin/init-store.sh
</span></span></code></pre></div><p>Start server</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hugegraph.sh
</span></span><span style=display:flex><span>Starting HugeGraphServer...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer <span style=color:#ce5c00;font-weight:700>(</span>http://127.0.0.1:8080/graphs<span style=color:#ce5c00;font-weight:700>)</span>....OK
</span></span></code></pre></div></details><h5 id=513-cassandra>5.1.3 Cassandra</h5><details><summary>Click to expand/collapse Cassandra configuration and startup methods</summary><blockquote><p>users need to install Cassandra by themselves, requiring version 3.0 or above, <a href=http://cassandra.apache.org/download/>download link</a></p></blockquote><p>Update hugegraph.properties</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=cassandra
</span></span><span style=display:flex><span>serializer=cassandra
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># cassandra backend config
</span></span><span style=display:flex><span>cassandra.host=localhost
</span></span><span style=display:flex><span>cassandra.port=9042
</span></span><span style=display:flex><span>cassandra.username=
</span></span><span style=display:flex><span>cassandra.password=
</span></span><span style=display:flex><span>#cassandra.connect_timeout=5
</span></span><span style=display:flex><span>#cassandra.read_timeout=20
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>#cassandra.keyspace.strategy=SimpleStrategy
</span></span><span style=display:flex><span>#cassandra.keyspace.replication=3
</span></span></code></pre></div><p>Initialize the database (required on first startup or a new configuration was manually added under &lsquo;conf/graphs/&rsquo;)</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> *hugegraph-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>
</span></span><span style=display:flex><span>bin/init-store.sh
</span></span><span style=display:flex><span>Initing HugeGraph Store...
</span></span><span style=display:flex><span>2017-12-01 11:26:51 <span style=color:#0000cf;font-weight:700>1424</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.HugeGraph <span style=color:#ce5c00;font-weight:700>[]</span> - Opening backend store: <span style=color:#4e9a06>&#39;cassandra&#39;</span>
</span></span><span style=display:flex><span>2017-12-01 11:26:52 <span style=color:#0000cf;font-weight:700>2389</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Failed to connect keyspace: hugegraph, try init keyspace later
</span></span><span style=display:flex><span>2017-12-01 11:26:52 <span style=color:#0000cf;font-weight:700>2472</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Failed to connect keyspace: hugegraph, try init keyspace later
</span></span><span style=display:flex><span>2017-12-01 11:26:52 <span style=color:#0000cf;font-weight:700>2557</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Failed to connect keyspace: hugegraph, try init keyspace later
</span></span><span style=display:flex><span>2017-12-01 11:26:53 <span style=color:#0000cf;font-weight:700>2797</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Store initialized: huge_graph
</span></span><span style=display:flex><span>2017-12-01 11:26:53 <span style=color:#0000cf;font-weight:700>2945</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Store initialized: huge_schema
</span></span><span style=display:flex><span>2017-12-01 11:26:53 <span style=color:#0000cf;font-weight:700>3044</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Store initialized: huge_index
</span></span><span style=display:flex><span>2017-12-01 11:26:53 <span style=color:#0000cf;font-weight:700>3046</span> <span style=color:#ce5c00;font-weight:700>[</span>pool-3-thread-1<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.Transaction <span style=color:#ce5c00;font-weight:700>[]</span> - Clear cache on event <span style=color:#4e9a06>&#39;store.init&#39;</span>
</span></span><span style=display:flex><span>2017-12-01 11:26:59 <span style=color:#0000cf;font-weight:700>9720</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.HugeGraph <span style=color:#ce5c00;font-weight:700>[]</span> - Opening backend store: <span style=color:#4e9a06>&#39;cassandra&#39;</span>
</span></span><span style=display:flex><span>2017-12-01 11:27:00 <span style=color:#0000cf;font-weight:700>9805</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Failed to connect keyspace: hugegraph1, try init keyspace later
</span></span><span style=display:flex><span>2017-12-01 11:27:00 <span style=color:#0000cf;font-weight:700>9886</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Failed to connect keyspace: hugegraph1, try init keyspace later
</span></span><span style=display:flex><span>2017-12-01 11:27:00 <span style=color:#0000cf;font-weight:700>9955</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Failed to connect keyspace: hugegraph1, try init keyspace later
</span></span><span style=display:flex><span>2017-12-01 11:27:00 <span style=color:#0000cf;font-weight:700>10175</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Store initialized: huge_graph
</span></span><span style=display:flex><span>2017-12-01 11:27:00 <span style=color:#0000cf;font-weight:700>10321</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Store initialized: huge_schema
</span></span><span style=display:flex><span>2017-12-01 11:27:00 <span style=color:#0000cf;font-weight:700>10413</span> <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.store.cassandra.CassandraStore <span style=color:#ce5c00;font-weight:700>[]</span> - Store initialized: huge_index
</span></span><span style=display:flex><span>2017-12-01 11:27:00 <span style=color:#0000cf;font-weight:700>10413</span> <span style=color:#ce5c00;font-weight:700>[</span>pool-3-thread-1<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> org.apache.hugegraph.backend.Transaction <span style=color:#ce5c00;font-weight:700>[]</span> - Clear cache on event <span style=color:#4e9a06>&#39;store.init&#39;</span>
</span></span></code></pre></div><p>Start server</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hugegraph.sh
</span></span><span style=display:flex><span>Starting HugeGraphServer...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer <span style=color:#ce5c00;font-weight:700>(</span>http://127.0.0.1:8080/graphs<span style=color:#ce5c00;font-weight:700>)</span>....OK
</span></span></code></pre></div></details><h5 id=514-scylladb>5.1.4 ScyllaDB</h5><details><summary>Click to expand/collapse ScyllaDB configuration and startup methods</summary><blockquote><p>users need to install ScyllaDB by themselves, version 2.1 or above is recommended, <a href=https://docs.scylladb.com/getting-started/>download link</a></p></blockquote><p>Update hugegraph.properties</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=scylladb
</span></span><span style=display:flex><span>serializer=scylladb
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># cassandra backend config
</span></span><span style=display:flex><span>cassandra.host=localhost
</span></span><span style=display:flex><span>cassandra.port=9042
</span></span><span style=display:flex><span>cassandra.username=
</span></span><span style=display:flex><span>cassandra.password=
</span></span><span style=display:flex><span>#cassandra.connect_timeout=5
</span></span><span style=display:flex><span>#cassandra.read_timeout=20
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>#cassandra.keyspace.strategy=SimpleStrategy
</span></span><span style=display:flex><span>#cassandra.keyspace.replication=3
</span></span></code></pre></div><p>Since the scylladb database itself is an &ldquo;optimized version&rdquo; based on cassandra, if the user does not have scylladb installed, they can also use cassandra as the backend storage directly. They only need to change the backend and serializer to scylladb, and the host and post point to the seeds and port of the cassandra cluster. Yes, but it is not recommended to do so, it will not take advantage of scylladb itself.</p><p>Initialize the database (required on first startup or a new configuration was manually added under &lsquo;conf/graphs/&rsquo;)</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> *hugegraph-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>
</span></span><span style=display:flex><span>bin/init-store.sh
</span></span></code></pre></div><p>Start server</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hugegraph.sh
</span></span><span style=display:flex><span>Starting HugeGraphServer...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer <span style=color:#ce5c00;font-weight:700>(</span>http://127.0.0.1:8080/graphs<span style=color:#ce5c00;font-weight:700>)</span>....OK
</span></span></code></pre></div></details><h5 id=515-hbase>5.1.5 HBase</h5><details><summary>Click to expand/collapse HBase configuration and startup methods</summary><blockquote><p>users need to install HBase by themselves, requiring version 2.0 or above,<a href=https://hbase.apache.org/downloads.html>download link</a></p></blockquote><p>Update hugegraph.properties</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=hbase
</span></span><span style=display:flex><span>serializer=hbase
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># hbase backend config
</span></span><span style=display:flex><span>hbase.hosts=localhost
</span></span><span style=display:flex><span>hbase.port=2181
</span></span><span style=display:flex><span># Note: recommend to modify the HBase partition number by the actual/env data amount &amp; RS amount before init store
</span></span><span style=display:flex><span># it may influence the loading speed a lot
</span></span><span style=display:flex><span>#hbase.enable_partition=true
</span></span><span style=display:flex><span>#hbase.vertex_partitions=10
</span></span><span style=display:flex><span>#hbase.edge_partitions=30
</span></span></code></pre></div><p>Initialize the database (required on first startup or a new configuration was manually added under &lsquo;conf/graphs/&rsquo;)</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> *hugegraph-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>
</span></span><span style=display:flex><span>bin/init-store.sh
</span></span></code></pre></div><p>Start server</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hugegraph.sh
</span></span><span style=display:flex><span>Starting HugeGraphServer...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer <span style=color:#ce5c00;font-weight:700>(</span>http://127.0.0.1:8080/graphs<span style=color:#ce5c00;font-weight:700>)</span>....OK
</span></span></code></pre></div><blockquote><p>for more other backend configurations, please refer to<a href=/docs/config/config-option>introduction to configuration options</a></p></blockquote></details><h5 id=516-mysql>5.1.6 MySQL</h5><details><summary>Click to expand/collapse MySQL configuration and startup methods</summary><blockquote><p>Due to MySQL is under GPL license, which is not compatible with Apache License indeed, Users need to install MySQL, <a href=https://dev.mysql.com/downloads/mysql/>Download Link</a></p></blockquote><p>Download MySQL&rsquo;s [driver package] (<a href=https://repo1.maven.org/maven2/mysql/mysql-connector-java/)>https://repo1.maven.org/maven2/mysql/mysql-connector-java/)</a>, such as <code>mysql-connector-java-8.0.30.jar</code>, and put it into HugeGraph- Server&rsquo;s <code>lib</code> directory.</p><p>Modify <code>hugegraph.properties</code>, configure the database URL, username and password, <code>store</code> is the database name, if not, it will be created automatically.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=mysql
</span></span><span style=display:flex><span>serializer=mysql
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>store=hugegraph
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># mysql backend config
</span></span><span style=display:flex><span>jdbc.driver=com.mysql.cj.jdbc.Driver
</span></span><span style=display:flex><span>jdbc.url=jdbc:mysql://127.0.0.1:3306
</span></span><span style=display:flex><span>jdbc.username=
</span></span><span style=display:flex><span>jdbc.password=
</span></span><span style=display:flex><span>jdbc.reconnect_max_times=3
</span></span><span style=display:flex><span>jdbc.reconnect_interval=3
</span></span><span style=display:flex><span>jdbc.ssl_mode=false
</span></span></code></pre></div><p>Initialize the database (required on first startup or a new configuration was manually added under &lsquo;conf/graphs/&rsquo;)</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> *hugegraph-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>
</span></span><span style=display:flex><span>bin/init-store.sh
</span></span></code></pre></div><p>Start server</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hugegraph.sh
</span></span><span style=display:flex><span>Starting HugeGraphServer...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer <span style=color:#ce5c00;font-weight:700>(</span>http://127.0.0.1:8080/graphs<span style=color:#ce5c00;font-weight:700>)</span>....OK
</span></span></code></pre></div></details><h5 id=517-create-an-example-graph-when-startup>5.1.7 Create an example graph when startup</h5><p>Carry the <code>-p true</code> arguments when starting the script, which indicates <code>preload</code>, to create a sample graph.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>bin/start-hugegraph.sh -p true
</span></span><span style=display:flex><span>Starting HugeGraphServer in daemon mode...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)......OK
</span></span></code></pre></div><p>And use the RESTful API to request <code>HugeGraphServer</code> and get the following result:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>curl</span> <span style=color:#4e9a06>&#34;http://localhost:8080/graphs/hugegraph/graph/vertices&#34;</span> <span style=color:#ce5c00;font-weight:700>|</span> <span style=color:#000>gunzip</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;vertices&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>[{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>328</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>35</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>27</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Hongkong&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>199</span><span style=color:#000;font-weight:700>}}]}</span>
</span></span></code></pre></div><p>This indicates the successful creation of the sample graph.</p><h4 id=52-use-docker-to-startup>5.2 Use Docker to startup</h4><p>In <a href=#33-use-docker-container>3.3 Use Docker container</a>, we have introduced how to use docker to deploy <code>hugegraph-server</code>. <code>server</code> can also preload an example graph by setting the parameter.</p><h5 id=521-uses-cassandra-as-storage>5.2.1 Uses Cassandra as storage</h5><details><summary>Click to expand/collapse Cassandra configuration and startup methods</summary><p>When using Docker, we can use Cassandra as the backend storage. We highly recommend using docker-compose directly to manage both the server and Cassandra.</p><p>The sample <code>docker-compose.yml</code> can be obtained on <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/docker/example/docker-compose-cassandra.yml>GitHub</a>, and you can start it with <code>docker-compose up -d</code>. (If using Cassandra 4.0 as the backend storage, it takes approximately two minutes to initialize. Please be patient.)</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#204a87;font-weight:700>version</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;3&#34;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>services</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>graph</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hugegraph</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>cas-server</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>8080</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8080</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>environment</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.backend</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>cassandra</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.serializer</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>cassandra</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.cassandra.host</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>cas-cassandra</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.cassandra.port</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>9042</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>networks</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#000>ca-network</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>depends_on</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#000>cassandra</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>healthcheck</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>test</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;CMD&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;bin/gremlin-console.sh&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;--&#34;</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;-e&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;scripts/remote-connect.groovy&#34;</span><span style=color:#000;font-weight:700>]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>interval</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>10s</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>timeout</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>30s</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>retries</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>3</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>cassandra</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>cassandra:4</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>cas-cassandra</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>7000</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>7000</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>9042</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>9042</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>security_opt</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#000>seccomp:unconfined</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>networks</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#000>ca-network</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>healthcheck</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>test</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;CMD&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;cqlsh&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;--execute&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;describe keyspaces;&#34;</span><span style=color:#000;font-weight:700>]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>interval</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>10s</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>timeout</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>30s</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>retries</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>5</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>networks</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ca-network</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>volumes</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph-data</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><p>In this yaml file, configuration parameters related to Cassandra need to be passed as environment variables in the format of <code>hugegraph.&lt;parameter_name></code>.</p><p>Specifically, in the configuration file <code>hugegraph.properties</code> , there are settings like <code>backend=xxx</code> and <code>cassandra.host=xxx</code>. To configure these settings during the process of passing environment variables, we need to prepend <code>hugegraph.</code> to these configurations, like <code>hugegraph.backend</code> and <code>hugegraph.cassandra.host</code>.</p><p>The rest of the configurations can be referenced under <a href=#4-config>4 config</a></p></details><h5 id=522-create-example-graph-when-starting-server>5.2.2 Create example graph when starting server</h5><p>Set the environment variable <code>PRELOAD=true</code> when starting Docker in order to load data during the execution of the startup script.</p><ol><li><p>Use <code>docker run</code></p><p>Use <code>docker run -itd --name=server -p 8080:8080 -e PRELOAD=true hugegraph/hugegraph:latest</code></p></li><li><p>Use <code>docker-compose</code></p><p>Create <code>docker-compose.yml</code> as following. We should set the environment variable <code>PRELOAD=true</code>. <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy><code>example.groovy</code></a> is a predefined script to preload the sample data. If needed, we can mount a new <code>example.groovy</code> to change the preload data.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#204a87;font-weight:700>version</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#39;3&#39;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>services</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>server</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hugegraph:latest</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>server</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>environment</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#000>PRELOAD=true</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>8080</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8080</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><p>Use <code>docker-compose up -d</code> to start the container</p></li></ol><p>And use the RESTful API to request <code>HugeGraphServer</code> and get the following result:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>curl</span> <span style=color:#4e9a06>&#34;http://localhost:8080/graphs/hugegraph/graph/vertices&#34;</span> <span style=color:#ce5c00;font-weight:700>|</span> <span style=color:#000>gunzip</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;vertices&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>[{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>328</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>35</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>27</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;Hongkong&#34;</span><span style=color:#000;font-weight:700>}},{</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>199</span><span style=color:#000;font-weight:700>}}]}</span>
</span></span></code></pre></div><p>This indicates the successful creation of the sample graph.</p><h3 id=6-access-server>6. Access server</h3><h4 id=61-service-startup-status-check>6.1 Service startup status check</h4><p>Use <code>jps</code> to see a service process</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>jps
</span></span><span style=display:flex><span><span style=color:#0000cf;font-weight:700>6475</span> HugeGraphServer
</span></span></code></pre></div><p><code>curl</code> request <code>RESTfulAPI</code></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>echo</span> <span style=color:#4e9a06>`</span>curl -o /dev/null -s -w %<span style=color:#ce5c00;font-weight:700>{</span>http_code<span style=color:#ce5c00;font-weight:700>}</span> <span style=color:#4e9a06>&#34;http://localhost:8080/graphs/hugegraph/graph/vertices&#34;</span><span style=color:#4e9a06>`</span>
</span></span></code></pre></div><p>Return 200, which means the server starts normally.</p><h4 id=62-request-server>6.2 Request Server</h4><p>The RESTful API of HugeGraphServer includes various types of resources, typically including graph, schema, gremlin, traverser and task.</p><ul><li><code>graph</code> contains <code>vertices</code><code>edges</code></li><li><code>schema</code> contains <code>vertexlabels</code><code>propertykeys</code><code>edgelabels</code><code>indexlabels</code></li><li><code>gremlin</code> contains various <code>Gremlin</code> statements, such as <code>g.v()</code>, which can be executed synchronously or asynchronously</li><li><code>traverser</code> contains various advanced queries including shortest paths, intersections, N-step reachable neighbors, etc.</li><li><code>task</code> contains query and delete with asynchronous tasks</li></ul><h5 id=621-get-vertices-and-its-related-properties-in-hugegraph>6.2.1 Get vertices and its related properties in <code>hugegraph</code></h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl http://localhost:8080/graphs/hugegraph/graph/vertices
</span></span></code></pre></div><p><em>explanation</em></p><ol><li><p>Since there are many vertices and edges in the graph, for list-type requests, such as getting all vertices, getting all edges, etc., the server will compress the data and return it, so when use curl, you get a bunch of garbled characters, you can redirect to gunzip for decompression. It is recommended to use Chrome browser + Restlet plugin to send HTTP requests for testing.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>curl &#34;http://localhost:8080/graphs/hugegraph/graph/vertices&#34; | gunzip
</span></span></code></pre></div></li><li><p>The current default configuration of HugeGraphServer can only be accessed locally, and the configuration can be modified so that it can be accessed on other machines.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>vim conf/rest-server.properties
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>restserver.url=http://0.0.0.0:8080
</span></span></code></pre></div></li></ol><p>response body:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>{
</span></span><span style=display:flex><span> &#34;vertices&#34;: [
</span></span><span style=display:flex><span> {
</span></span><span style=display:flex><span> &#34;id&#34;: &#34;2lop&#34;,
</span></span><span style=display:flex><span> &#34;label&#34;: &#34;software&#34;,
</span></span><span style=display:flex><span> &#34;type&#34;: &#34;vertex&#34;,
</span></span><span style=display:flex><span> &#34;properties&#34;: {
</span></span><span style=display:flex><span> &#34;price&#34;: [
</span></span><span style=display:flex><span> {
</span></span><span style=display:flex><span> &#34;id&#34;: &#34;price&#34;,
</span></span><span style=display:flex><span> &#34;value&#34;: 328
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> ],
</span></span><span style=display:flex><span> &#34;name&#34;: [
</span></span><span style=display:flex><span> {
</span></span><span style=display:flex><span> &#34;id&#34;: &#34;name&#34;,
</span></span><span style=display:flex><span> &#34;value&#34;: &#34;lop&#34;
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> ],
</span></span><span style=display:flex><span> &#34;lang&#34;: [
</span></span><span style=display:flex><span> {
</span></span><span style=display:flex><span> &#34;id&#34;: &#34;lang&#34;,
</span></span><span style=display:flex><span> &#34;value&#34;: &#34;java&#34;
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> ]
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> },
</span></span><span style=display:flex><span> {
</span></span><span style=display:flex><span> &#34;id&#34;: &#34;1josh&#34;,
</span></span><span style=display:flex><span> &#34;label&#34;: &#34;person&#34;,
</span></span><span style=display:flex><span> &#34;type&#34;: &#34;vertex&#34;,
</span></span><span style=display:flex><span> &#34;properties&#34;: {
</span></span><span style=display:flex><span> &#34;name&#34;: [
</span></span><span style=display:flex><span> {
</span></span><span style=display:flex><span> &#34;id&#34;: &#34;name&#34;,
</span></span><span style=display:flex><span> &#34;value&#34;: &#34;josh&#34;
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> ],
</span></span><span style=display:flex><span> &#34;age&#34;: [
</span></span><span style=display:flex><span> {
</span></span><span style=display:flex><span> &#34;id&#34;: &#34;age&#34;,
</span></span><span style=display:flex><span> &#34;value&#34;: 32
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> ]
</span></span><span style=display:flex><span> }
</span></span><span style=display:flex><span> },
</span></span><span style=display:flex><span> ...
</span></span><span style=display:flex><span> ]
</span></span><span style=display:flex><span>}
</span></span></code></pre></div><p id=swaggerui-example></p><p>For detailed API, please refer to <a href=/docs/clients/restful-api>RESTful-API</a></p><p>You can also visit <code>localhost:8080/swagger-ui/index.html</code> to check the API.</p><div style=text-align:center><img src=/docs/images/images-server/swagger-ui.png alt=image></div><p>When using Swagger UI to debug the API provided by HugeGraph, if HugeGraph Server turns on authentication mode, you can enter authentication information on the Swagger page.</p><div style=text-align:center><img src=/docs/images/images-server/swagger-ui-where-set-auth-example.png alt=image></div><p>Currently, HugeGraph supports setting authentication information in two forms: Basic and Bearer.</p><div style=text-align:center><img src=/docs/images/images-server/swagger-ui-set-auth-example.png alt=image></div><h3 id=7-stop-server>7 Stop Server</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#000>$cd</span> *hugegraph-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>
</span></span><span style=display:flex><span><span style=color:#000>$bin</span>/stop-hugegraph.sh
</span></span></code></pre></div><h3 id=8-debug-server-with-intellij-idea>8 Debug Server with IntelliJ IDEA</h3><p>Please refer to <a href=/docs/contribution-guidelines/hugegraph-server-idea-setup>Setup Server in IDEA</a></p></div><div class=td-content style=page-break-before:always><h1 id=pg-685a02f8811d86f1ce195d7c73d9ea44>3.2 - HugeGraph-Loader Quick Start</h1><h3 id=1-hugegraph-loader-overview>1 HugeGraph-Loader Overview</h3><p>HugeGraph-Loader is the data import component of HugeGraph, which can convert data from various data sources into graph vertices and edges and import them into the graph database in batches.</p><p>Currently supported data sources include:</p><ul><li>Local disk file or directory, supports TEXT, CSV and JSON format files, supports compressed files</li><li>HDFS file or directory, supports compressed files</li><li>Mainstream relational databases, such as MySQL, PostgreSQL, Oracle, SQL Server</li></ul><p>Local disk files and HDFS files support resumable uploads.</p><p>It will be explained in detail below.</p><blockquote><p>Note: HugeGraph-Loader requires HugeGraph Server service, please refer to <a href=/docs/quickstart/hugegraph-server>HugeGraph-Server Quick Start</a> to download and start Server</p></blockquote><h3 id=2-get-hugegraph-loader>2 Get HugeGraph-Loader</h3><p>There are two ways to get HugeGraph-Loader:</p><ul><li>Use docker image (Convenient for Test/Dev)</li><li>Download the compiled tarball</li><li>Clone source code then compile and install</li></ul><h4 id=21-use-docker-image-convenient-for-testdev>2.1 Use Docker image (Convenient for Test/Dev)</h4><p>We can deploy the loader service using <code>docker run -itd --name loader hugegraph/loader</code>. For the data that needs to be loaded, it can be copied into the loader container either by mounting <code>-v /path/to/data/file:/loader/file</code> or by using <code>docker cp</code>.</p><p>Alternatively, to start the loader using docker-compose, the command is <code>docker-compose up -d</code>. An example of the docker-compose.yml is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#204a87;font-weight:700>version</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#39;3&#39;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>services</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>server</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hugegraph</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>server</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>8080</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8080</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>loader</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/loader</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>loader</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># mount your own data here</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># volumes:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># - /path/to/data/file:/loader/file</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><p>The specific data loading process can be referenced under <a href=#45-use-docker-to-load-data>4.5 User Docker to load data</a></p><blockquote><p>Note:</p><ol><li><p>The docker image of hugegraph-loader is a convenience release to start hugegraph-loader quickly, but not <strong>official distribution</strong> artifacts. You can find more details from <a href=https://infra.apache.org/release-distribution.html#dockerhub>ASF Release Distribution Policy</a>.</p></li><li><p>Recommand to use <code>release tag</code>(like <code>1.2.0</code>) for the stable version. Use <code>latest</code> tag to experience the newest functions in development.</p></li></ol></blockquote><h4 id=22-download-the-compiled-archive>2.2 Download the compiled archive</h4><p>Download the latest version of the HugeGraph-Toolchain release package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>/apache-hugegraph-toolchain-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz
</span></span><span style=display:flex><span>tar zxf *hugegraph*.tar.gz
</span></span></code></pre></div><h4 id=23-clone-source-code-to-compile-and-install>2.3 Clone source code to compile and install</h4><p>Clone the latest version of HugeGraph-Loader source package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 1. get from github</span>
</span></span><span style=display:flex><span>git clone https://github.com/apache/hugegraph-toolchain.git
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 2. get from direct (e.g. here is 1.0.0, please choose the latest version)</span>
</span></span><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>/apache-hugegraph-toolchain-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>-src.tar.gz
</span></span></code></pre></div><details><summary>click to fold/collapse hwo to install ojdbc</summary><p>Due to the license limitation of the <code>Oracle OJDBC</code>, you need to manually install ojdbc to the local maven repository.
Visit the <a href=https://www.oracle.com/database/technologies/appdev/jdbc-drivers-archive.html>Oracle jdbc downloads</a> page. Select Oracle Database 12c Release 2 (12.2.0.1) drivers, as shown in the following figure.</p><p>After opening the link, select &ldquo;ojdbc8.jar&rdquo;.</p><p>Install ojdbc8 to the local maven repository, enter the directory where <code>ojdbc8.jar</code> is located, and execute the following command.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>mvn install:install-file -Dfile=./ojdbc8.jar -DgroupId=com.oracle -DartifactId=ojdbc8 -Dversion=12.2.0.1 -Dpackaging=jar
</span></span></code></pre></div></details><p>Compile and generate tar package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> hugegraph-loader
</span></span><span style=display:flex><span>mvn clean package -DskipTests
</span></span></code></pre></div><h3 id=3-how-to-use>3 How to use</h3><p>The basic process of using HugeGraph-Loader is divided into the following steps:</p><ul><li>Write graph schema</li><li>Prepare data files</li><li>Write input source map files</li><li>Execute command import</li></ul><h4 id=31-construct-graph-schema>3.1 Construct graph schema</h4><p>This step is the modeling process. Users need to have a clear idea of ​​their existing data and the graph model they want to create, and then write the schema to build the graph model.</p><p>For example, if you want to create a graph with two types of vertices and two types of edges, the vertices are &ldquo;people&rdquo; and &ldquo;software&rdquo;, the edges are &ldquo;people know people&rdquo; and &ldquo;people create software&rdquo;, and these vertices and edges have some attributes, For example, the vertex &ldquo;person&rdquo; has: &ldquo;name&rdquo;, &ldquo;age&rdquo; and other attributes,
&ldquo;Software&rdquo; includes: &ldquo;name&rdquo;, &ldquo;sale price&rdquo; and other attributes; side &ldquo;knowledge&rdquo; includes: &ldquo;date&rdquo; attribute and so on.</p><div style=text-align:center><img src=/docs/images/demo-graph-model.png alt=image><p>graph model example</p></div><p>After designing the graph model, we can use <code>groovy</code> to write the definition of <code>schema</code> and save it to a file, here named <code>schema.groovy</code>.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Create some properties
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Create the person vertex type, which has three attributes: name, age, city, and the primary key is name
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Create a software vertex type, which has two properties: name, price, the primary key is name
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Create the knows edge type, which goes from person to person
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Create the created edge type, which points from person to software
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><blockquote><p>Please refer to the corresponding section in <a href=/docs/clients/hugegraph-client>hugegraph-client</a> for the detailed description of the schema.</p></blockquote><h4 id=32-prepare-data>3.2 Prepare data</h4><p>The data sources currently supported by HugeGraph-Loader include:</p><ul><li>local disk file or directory</li><li>HDFS file or directory</li><li>Partial relational database</li><li>Kafka topic</li></ul><h5 id=321-data-source-structure>3.2.1 Data source structure</h5><h6 id=3211-local-disk-file-or-directory>3.2.1.1 Local disk file or directory</h6><p>The user can specify a local disk file as the data source. If the data is scattered in multiple files, a certain directory is also supported as the data source, but multiple directories are not supported as the data source for the time being.</p><p>For example: my data is scattered in multiple files, part-0, part-1 &mldr; part-n. To perform the import, it must be ensured that they are placed in one directory. Then in the loader&rsquo;s mapping file, specify <code>path</code> as the directory.</p><p>Supported file formats include:</p><ul><li>TEXT</li><li>CSV</li><li>JSON</li></ul><p>TEXT is a text file with custom delimiters, the first line is usually the header, and the name of each column is recorded, and no header line is allowed (specified in the mapping file). Each remaining row represents a record, which will be converted into a vertex/edge; each column of the row corresponds to a field, which will be converted into the id, label or attribute of the vertex/edge;</p><p>An example is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>id|name|lang|price|ISBN
</span></span><span style=display:flex><span>1|lop|java|328|ISBN978-7-107-18618-5
</span></span><span style=display:flex><span>2|ripple|java|199|ISBN978-7-100-13678-5
</span></span></code></pre></div><p>CSV is a TEXT file with commas <code>,</code> as delimiters. When a column value itself contains a comma, the column value needs to be enclosed in double quotes, for example:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>marko,29,Beijing
</span></span><span style=display:flex><span>&#34;li,nary&#34;,26,&#34;Wu,han&#34;
</span></span></code></pre></div><p>The JSON file requires that each line is a JSON string, and the format of each line needs to be consistent.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160110&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.5</span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20130220&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=3212-hdfs-file-or-directory>3.2.1.2 HDFS file or directory</h6><p>Users can also specify HDFS files or directories as data sources, all of the above requirements for <code>local disk files or directories</code> apply here. In addition, since HDFS usually stores compressed files, loader also provides support for compressed files, and <code>local disk file or directory</code> also supports compressed files.</p><p>Currently supported compressed file types include: GZIP, BZ2, XZ, LZMA, SNAPPY_RAW, SNAPPY_FRAMED, Z, DEFLATE, LZ4_BLOCK, LZ4_FRAMED, ORC, and PARQUET.</p><h6 id=3213-mainstream-relational-database>3.2.1.3 Mainstream relational database</h6><p>The loader also supports some relational databases as data sources, and currently supports MySQL, PostgreSQL, Oracle and SQL Server.</p><p>However, the requirements for the table structure are relatively strict at present. If <strong>association query</strong> needs to be done during the import process, such a table structure is not allowed. The associated query means: after reading a row of the table, it is found that the value of a certain column cannot be used directly (such as a foreign key), and you need to do another query to determine the true value of the column.</p><p>For example: Suppose there are three tables, person, software and created</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>// person schema
</span></span><span style=display:flex><span>id | name | age | city
</span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>// software schema
</span></span><span style=display:flex><span>id | name | lang | price
</span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>// created schema
</span></span><span style=display:flex><span>id | p_id | s_id | date
</span></span></code></pre></div><p>If the id strategy of person or software is specified as PRIMARY_KEY when modeling (schema), choose name as the primary key (note: this is the concept of vertex-label in hugegraph), when importing edge data, the source vertex and target need to be spliced ​​out. For the id of the vertex, you must go to the person/software table with p_id/s_id to find the corresponding name. In the case of the schema that requires additional query, the loader does not support it temporarily. In this case, the following two methods can be used instead:</p><ol><li>The id strategy of person and software is still specified as PRIMARY_KEY, but the id column of the person table and software table is used as the primary key attribute of the vertex, so that the id can be generated by directly splicing p_id and s_id with the label of the vertex when importing an edge;</li><li>Specify the id policy of person and software as CUSTOMIZE, and then directly use the id column of the person table and the software table as the vertex id, so that p_id and s_id can be used directly when importing edges;</li></ol><p>The key point is to make the edge use p_id and s_id directly, don&rsquo;t check it again.</p><h5 id=322-prepare-vertex-and-edge-data>3.2.2 Prepare vertex and edge data</h5><h6 id=3221-vertex-data>3.2.2.1 Vertex Data</h6><p>The vertex data file consists of data line by line. Generally, each line is used as a vertex, and each column is used as a vertex attribute. The following description uses CSV format as an example.</p><ul><li>person vertex data (the data itself does not contain a header)</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>Tom,48,Beijing
</span></span><span style=display:flex><span>Jerry,36,Shanghai
</span></span></code></pre></div><ul><li>software vertex data (the data itself contains the header)</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>name,price
</span></span><span style=display:flex><span>Photoshop,999
</span></span><span style=display:flex><span>Office,388
</span></span></code></pre></div><h6 id=3222-edge-data>3.2.2.2 Edge data</h6><p>The edge data file consists of data line by line. Generally, each line is used as an edge. Some columns are used as the IDs of the source and target vertices, and other columns are used as edge attributes. The following uses JSON format as an example.</p><ul><li>knows edge data</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Tom&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Jerry&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2008-12-12&#34;</span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><ul><li>created edge data</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Tom&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Photoshop&#34;</span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Tom&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Office&#34;</span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Jerry&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Office&#34;</span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=33-write-data-source-mapping-file>3.3 Write data source mapping file</h4><h5 id=331-mapping-file-overview>3.3.1 Mapping file overview</h5><p>The mapping file of the input source is used to describe how to establish the mapping relationship between the input source data and the vertex type/edge type of the graph. It is organized in <code>JSON</code> format and consists of multiple mapping blocks, each of which is responsible for mapping an input source. Mapped to vertices and edges.</p><p>Specifically, each mapping block contains <strong>an input source</strong> and multiple <strong>vertex mapping</strong> and <strong>edge mapping</strong> blocks, and the input source block corresponds to the <code>local disk file or directory</code>, <code>HDFS file or directory</code> and <code>relational database</code> are responsible for describing the basic information of the data source, such as where the data is, what format, what is the delimiter, etc. The vertex map/edge map is bound to the input source, which columns of the input source can be selected, which columns are used as ids, which columns are used as attributes, and what attributes are mapped to each column, the values ​​of the columns are mapped to what values ​​of attributes, and so on.</p><p>In the simplest terms, each mapping block describes: where is the file to be imported, which type of vertices/edges each line of the file is to be used as, which columns of the file need to be imported, and the corresponding vertices/edges of these columns. what properties etc.</p><blockquote><p>Note: The format of the mapping file before version 0.11.0 and the format after 0.11.0 has changed greatly. For the convenience of expression, the mapping file (format) before 0.11.0 is called version 1.0, and the version after 0.11.0 is version 2.0 . And unless otherwise specified, the &ldquo;map file&rdquo; refers to version 2.0.</p></blockquote><details><summary>Click to expand/collapse the skeleton of the map file for version 2.0</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;version&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2.0&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;structs&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></details><br><p>Two versions of the mapping file are given directly here (the above graph model and data file are described)</p><details><summary>Click to expand/collapse mapping file for version 2.0</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;version&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2.0&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;structs&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;FILE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex_person.csv&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;file_filter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;extensions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;*&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CSV&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;,&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;yyyy-MM-dd HH:mm:ss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;time_zone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GMT+8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skipped_line&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;regex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;(^#|^//).*|&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;compression&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;charset&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UTF-8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;list_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start_symbol&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;[&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;elem_delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;|&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end_symbol&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;]&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;unfold&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;selected&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;null_values&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;update_strategies&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;FILE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex_software.csv&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;file_filter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;extensions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;*&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CSV&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;,&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;yyyy-MM-dd HH:mm:ss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;time_zone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GMT+8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skipped_line&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;regex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;(^#|^//).*|&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;compression&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;charset&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UTF-8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;list_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start_symbol&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;elem_delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;,&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end_symbol&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;unfold&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;selected&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;null_values&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;update_strategies&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;FILE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge_knows.json&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;file_filter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;extensions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;*&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;JSON&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;yyyy-MM-dd HH:mm:ss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;time_zone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GMT+8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skipped_line&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;regex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;(^#|^//).*|&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;compression&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;charset&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UTF-8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;list_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;source_name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;unfold_source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;target_name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;unfold_target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;selected&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;null_values&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;update_strategies&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;4&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;FILE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge_created.json&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;file_filter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;extensions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;*&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;JSON&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;yyyy-MM-dd HH:mm:ss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;time_zone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GMT+8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skipped_line&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;regex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;(^#|^//).*|&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;compression&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;charset&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UTF-8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;list_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;source_name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;unfold_source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;target_name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;unfold_target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;selected&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;null_values&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;update_strategies&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></details><br><details><summary>Click to expand/collapse mapping file for version 1.0</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex_person.csv&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CSV&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;charset&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UTF-8&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex_software.csv&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CSV&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge_knows.json&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;JSON&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge_created.json&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;JSON&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></details><br><p>The 1.0 version of the mapping file is centered on the vertex and edge, and sets the input source; while the 2.0 version is centered on the input source, and sets the vertex and edge mapping. Some input sources (such as a file) can generate both vertices and edges. If you write in the 1.0 format, you need to write an input block in each of the vertex and edge mapping blocks. The two input blocks are exactly the same ; and the 2.0 version only needs to write input once. Therefore, compared with version 1.0, version 2.0 can save some repetitive writing of input.</p><p>In the bin directory of hugegraph-loader-{version}, there is a script tool <code>mapping-convert.sh</code> that can directly convert the mapping file of version 1.0 to version 2.0. The usage is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/mapping-convert.sh struct.json
</span></span></code></pre></div><p>A struct-v2.json will be generated in the same directory as struct.json.</p><h5 id=332-input-source>3.3.2 Input Source</h5><p>Input sources are currently divided into four categories: FILE, HDFS, JDBC and KAFKA, which are distinguished by the <code>type</code> node. We call them local file input sources, HDFS input sources, JDBC input sources, and KAFKA input sources, which are described below.</p><h6 id=3321-local-file-input-source>3.3.2.1 Local file input source</h6><ul><li>id: The id of the input source. This field is used to support some internal functions. It is not required (it will be automatically generated if it is not filled in). It is strongly recommended to write it, which is very helpful for debugging;</li><li>skip: whether to skip the input source, because the JSON file cannot add comments, if you do not want to import an input source during a certain import, but do not want to delete the configuration of the input source, you can set it to true to skip it, the default is false, not required;</li><li>input: input source map block, composite structure<ul><li>type: input source type, file or FILE must be filled;</li><li>path: the path of the local file or directory, the absolute path or the relative path relative to the mapping file, it is recommended to use the absolute path, required;</li><li>file_filter: filter files with compound conditions from <code>path</code>, compound structure, currently only supports configuration extensions, represented by child node <code>extensions</code>, the default is &ldquo;*&rdquo;, which means to keep all files;</li><li>format: the format of the local file, the optional values ​​are CSV, TEXT and JSON, which must be uppercase and required;</li><li>header: the column name of each column of the file, if not specified, the first line of the data file will be used as the header; when the file itself has a header and the header is specified, the first line of the file will be treated as a normal data line; JSON The file does not need to specify a header, optional;</li><li>delimiter: The column delimiter of the file line, the default is comma <code>","</code> as the delimiter, the <code>JSON</code> file does not need to be specified, optional;</li><li>charset: the encoded character set of the file, the default is <code>UTF-8</code>, optional;</li><li>date_format: custom date format, the default value is yyyy-MM-dd HH:mm:ss, optional; if the date is presented in the form of a timestamp, this item must be written as <code>timestamp</code> (fixed writing);</li><li>time_zone: Set which time zone the date data is in, the default value is <code>GMT+8</code>, optional;</li><li>skipped_line: The line to be skipped, compound structure, currently only the regular expression of the line to be skipped can be configured, described by the child node <code>regex</code>, no line is skipped by default, optional;</li><li>compression: The compression format of the file, the optional values ​​are NONE, GZIP, BZ2, XZ, LZMA, SNAPPY_RAW, SNAPPY_FRAMED, Z, DEFLATE, LZ4_BLOCK, LZ4_FRAMED, ORC and PARQUET, the default is NONE, which means a non-compressed file, optional;</li><li>list_format: When a column of the file (non-JSON) is a collection structure (the Cardinality of the PropertyKey in the corresponding figure is Set or List), you can use this item to set the start character, separator, and end character of the column, compound structure :<ul><li>start_symbol: The start character of the collection structure column (the default value is <code>[</code>, JSON format currently does not support specification)</li><li>elem_delimiter: the delimiter of the collection structure column (the default value is <code>|</code>, JSON format currently only supports native <code>,</code> delimiter)</li><li>end_symbol: the end character of the collection structure column (the default value is <code>]</code>, the JSON format does not currently support specification)</li></ul></li></ul></li></ul><h6 id=3322-hdfs-input-source>3.3.2.2 HDFS input source</h6><p>The nodes and meanings of the above <code>local file input source</code> are basically applicable here. Only the different and unique nodes of the HDFS input source are listed below.</p><ul><li>type: input source type, must fill in hdfs or HDFS, required;</li><li>path: the path of the HDFS file or directory, it must be the absolute path of HDFS, required;</li><li>core_site_path: the path of the core-site.xml file of the HDFS cluster, the key point is to specify the address of the NameNode (<code>fs.default.name</code>) and the implementation of the file system (<code>fs.hdfs.impl</code>);</li></ul><h6 id=3323-jdbc-input-source>3.3.2.3 JDBC input source</h6><p>As mentioned above, it supports multiple relational databases, but because their mapping structures are very similar, they are collectively referred to as JDBC input sources, and then use the <code>vendor</code> node to distinguish different databases.</p><ul><li>type: input source type, must fill in jdbc or JDBC, required;</li><li>vendor: database type, optional options are [MySQL, PostgreSQL, Oracle, SQLServer], case-insensitive, required;</li><li>driver: the type of driver used by jdbc, required;</li><li>url: the url of the database that jdbc wants to connect to, required;</li><li>database: the name of the database to be connected, required;</li><li>schema: The name of the schema to be connected, different databases have different requirements, and the details are explained below;</li><li>table: the name of the table to be connected, at least one of <code>table</code> or <code>custom_sql</code> is required;</li><li>custom_sql: custom SQL statement, at least one of <code>table</code> or <code>custom_sql</code> is required;</li><li>username: username to connect to the database, required;</li><li>password: password for connecting to the database, required;</li><li>batch_size: The size of one page when obtaining table data by page, the default is 500, optional;</li></ul><p><strong>MYSQL</strong></p><table><thead><tr><th>Node</th><th>Fixed value or common value</th></tr></thead><tbody><tr><td>vendor</td><td>MYSQL</td></tr><tr><td>driver</td><td>com.mysql.cj.jdbc.Driver</td></tr><tr><td>url</td><td>jdbc:mysql://127.0.0.1:3306</td></tr></tbody></table><p>schema: nullable, if filled in, it must be the same as the value of database</p><p><strong>POSTGRESQL</strong></p><table><thead><tr><th>Node</th><th>Fixed value or common value</th></tr></thead><tbody><tr><td>vendor</td><td>POSTGRESQL</td></tr><tr><td>driver</td><td>org.postgresql.Driver</td></tr><tr><td>url</td><td>jdbc:postgresql://127.0.0.1:5432</td></tr></tbody></table><p>schema: nullable, default is &ldquo;public&rdquo;</p><p><strong>ORACLE</strong></p><table><thead><tr><th>Node</th><th>Fixed value or common value</th></tr></thead><tbody><tr><td>vendor</td><td>ORACLE</td></tr><tr><td>driver</td><td>oracle.jdbc.driver.OracleDriver</td></tr><tr><td>url</td><td>jdbc:oracle:thin:@127.0.0.1:1521</td></tr></tbody></table><p>schema: nullable, the default value is the same as the username</p><p><strong>SQLSERVER</strong></p><table><thead><tr><th>Node</th><th>Fixed value or common value</th></tr></thead><tbody><tr><td>vendor</td><td>SQLSERVER</td></tr><tr><td>driver</td><td>com.microsoft.sqlserver.jdbc.SQLServerDriver</td></tr><tr><td>url</td><td>jdbc:sqlserver://127.0.0.1:1433</td></tr></tbody></table><p>schema: required</p><h6 id=3324-kafka-input-source>3.3.2.4 Kafka input source</h6><ul><li>type: input source type, <code>kafka</code> or <code>KAFKA</code>, required;</li><li>bootstrap_server: set the list of kafka bootstrap servers;</li><li>topic: the topic to subscribe to;</li><li>group: group of Kafka consumers;</li><li>from_beginning: set whether to read from the beginning;</li><li>format: format of the local file, options are CSV, TEXT and JSON, must be uppercase, required;</li><li>header: column name of each column of the file, if not specified, the first line of the data file will be used as the header; when the file itself has a header and the header is specified, the first line of the file will be treated as an ordinary data line; JSON files do not need to specify the header, optional;</li><li>delimiter: delimiter of the file line, default is comma &ldquo;,&rdquo; as delimiter, JSON files do not need to specify, optional;</li><li>charset: encoding charset of the file, default is UTF-8, optional;</li><li>date_format: customized date format, default value is yyyy-MM-dd HH:mm:ss, optional; if the date is presented in the form of timestamp, this item must be written as timestamp (fixed);</li><li>extra_date_formats: a customized list of other date formats, empty by default, optional; each item in the list is an alternate date format to the date_format specified date format;</li><li>time_zone: set which time zone the date data is in, default is GMT+8, optional;</li><li>skipped_line: the line you want to skip, composite structure, currently can only configure the regular expression of the line to be skipped, described by the child node regex, the default is not to skip any line, optional;</li><li>early_stop: the record pulled from Kafka broker at a certain time is empty, stop the task, default is false, only for debugging, optional;</li></ul><h5 id=333-vertex-and-edge-mapping>3.3.3 Vertex and Edge Mapping</h5><p>The nodes of vertex and edge mapping (a key in the JSON file) have a lot of the same parts. The same parts are introduced first, and then the unique nodes of <code>vertex map</code> and <code>edge map</code> are introduced respectively.</p><p><strong>Nodes of the same section</strong></p><ul><li>label: <code>label</code> to which the vertex/edge data to be imported belongs, required;</li><li>field_mapping: Map the column name of the input source column to the attribute name of the vertex/edge, optional;</li><li>value_mapping: map the data value of the input source to the attribute value of the vertex/edge, optional;</li><li>selected: select some columns to insert, other unselected ones are not inserted, cannot exist at the same time as <code>ignored</code>, optional;</li><li>ignored: ignore some columns so that they do not participate in insertion, cannot exist at the same time as <code>selected</code>, optional;</li><li>null_values: You can specify some strings to represent null values, such as &ldquo;NULL&rdquo;. If the vertex/edge attribute corresponding to this column is also a nullable attribute, the value of this attribute will not be set when constructing the vertex/edge, optional ;</li><li>update_strategies: If the data needs to be <strong>updated</strong> in batches in a specific way, you can specify a specific update strategy for each attribute (see below for details), optional;</li><li>unfold: Whether to unfold the column, each unfolded column will form a row with other columns, which is equivalent to unfolding into multiple rows; for example, the value of a certain column (id column) of the file is <code>[1,2,3]</code>, The values ​​of other columns are <code>18,Beijing</code>. When unfold is set, this row will become 3 rows, namely: <code>1,18,Beijing</code>, <code>2,18,Beijing</code> and <code>3,18, Beijing</code>. Note that this will only expand the column selected as id. Default false, optional;</li></ul><p><strong>Update strategy</strong> supports 8 types: (requires all uppercase)</p><ol><li>Value accumulation: <code>SUM</code></li><li>Take the greater of the two numbers/dates: <code>BIGGER</code></li><li>Take the smaller of two numbers/dates: <code>SMALLER</code></li><li><strong>Set</strong> property takes union: <code>UNION</code></li><li><strong>Set</strong> attribute intersection: <code>INTERSECTION</code></li><li><strong>List</strong> attribute append element: <code>APPEND</code></li><li><strong>List/Set</strong> attribute delete element: <code>ELIMINATE</code></li><li>Override an existing property: <code>OVERRIDE</code></li></ol><p><strong>Note:</strong> If the newly imported attribute value is empty, the existing old data will be used instead of the empty value. For the effect, please refer to the following example</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// The update strategy is specified in the JSON file as follows
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;update_strategies&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SMALLER&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;set&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UNION&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex_person.txt&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;set&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// 1. Write a line of data with the OVERRIDE update strategy (null means empty here)
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#a40000>&#39;a</span> <span style=color:#a40000>b</span> <span style=color:#204a87;font-weight:700>null</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#a40000>&#39;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// 2. Write another line
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#a40000>&#39;</span><span style=color:#204a87;font-weight:700>null</span> <span style=color:#204a87;font-weight:700>null</span> <span style=color:#a40000>c</span> <span style=color:#a40000>d&#39;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// 3. Finally we can get
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#a40000>&#39;a</span> <span style=color:#a40000>b</span> <span style=color:#a40000>c</span> <span style=color:#a40000>d&#39;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// If there is no update strategy, you will get
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#a40000>&#39;</span><span style=color:#204a87;font-weight:700>null</span> <span style=color:#204a87;font-weight:700>null</span> <span style=color:#a40000>c</span> <span style=color:#a40000>d&#39;</span>
</span></span></code></pre></div><blockquote><p><strong>Note</strong> : After adopting the batch update strategy, the number of disk read requests will increase significantly, and the import speed will be several times slower than that of pure write coverage (at this time HDD disk [IOPS](<a href=https://en.wikipedia>https://en.wikipedia</a> .org/wiki/IOPS) will be the bottleneck, SSD is recommended for speed)</p></blockquote><p><strong>Unique Nodes for Vertex Maps</strong></p><ul><li>id: Specify a column as the id column of the vertex. When the vertex id policy is <code>CUSTOMIZE</code>, it is required; when the id policy is <code>PRIMARY_KEY</code>, it must be empty;</li></ul><p><strong>Unique Nodes for Edge Maps</strong></p><ul><li>source: Select certain columns of the input source as the id column of <strong>source vertex</strong>. When the id policy of the source vertex is <code>CUSTOMIZE</code>, a certain column must be specified as the id column of the vertex; when the id policy of the source vertex is <code>When PRIMARY_KEY</code>, one or more columns must be specified for splicing the id of the generated vertex, that is, no matter which id strategy is used, this item is required;</li><li>target: Specify certain columns as the id columns of <strong>target vertex</strong>, similar to source, so I won&rsquo;t repeat them;</li><li>unfold_source: Whether to unfold the source column of the file, the effect is similar to that in the vertex map, and will not be repeated;</li><li>unfold_target: Whether to unfold the target column of the file, the effect is similar to that in the vertex mapping, and will not be repeated;</li></ul><h4 id=34-execute-command-import>3.4 Execute command import</h4><p>After preparing the graph model, data file, and input source mapping relationship file, the data file can be imported into the graph database.</p><p>The import process is controlled by commands submitted by the user, and the user can control the specific process of execution through different parameters.</p><h5 id=341-parameter-description>3.4.1 Parameter description</h5><table><thead><tr><th>Parameter</th><th>Default value</th><th>Required or not</th><th>Description</th></tr></thead><tbody><tr><td><code>-f</code> or <code>--file</code></td><td></td><td>Y</td><td>path to configure script</td></tr><tr><td><code>-g</code> or <code>--graph</code></td><td></td><td>Y</td><td>graph space name</td></tr><tr><td><code>-s</code> or <code>--schema</code></td><td></td><td>Y</td><td>schema file path</td></tr><tr><td><code>-h</code> or <code>--host</code></td><td>localhost</td><td></td><td>address of HugeGraphServer</td></tr><tr><td><code>-p</code> or <code>--port</code></td><td>8080</td><td></td><td>port number of HugeGraphServer</td></tr><tr><td><code>--username</code></td><td>null</td><td></td><td>When HugeGraphServer enables permission authentication, the username of the current graph</td></tr><tr><td><code>--token</code></td><td>null</td><td></td><td>When HugeGraphServer has enabled authorization authentication, the token of the current graph</td></tr><tr><td><code>--protocol</code></td><td>http</td><td></td><td>Protocol for sending requests to the server, optional http or https</td></tr><tr><td><code>--trust-store-file</code></td><td></td><td></td><td>When the request protocol is https, the client&rsquo;s certificate file path</td></tr><tr><td><code>--trust-store-password</code></td><td></td><td></td><td>When the request protocol is https, the client certificate password</td></tr><tr><td><code>--clear-all-data</code></td><td>false</td><td></td><td>Whether to clear the original data on the server before importing data</td></tr><tr><td><code>--clear-timeout</code></td><td>240</td><td></td><td>Timeout for clearing the original data on the server before importing data</td></tr><tr><td><code>--incremental-mode</code></td><td>false</td><td></td><td>Whether to use the breakpoint resume mode, only the input source is FILE and HDFS support this mode, enabling this mode can start the import from the place where the last import stopped</td></tr><tr><td><code>--failure-mode</code></td><td>false</td><td></td><td>When the failure mode is true, the data that failed before will be imported. Generally speaking, the failed data file needs to be manually corrected and edited, and then imported again</td></tr><tr><td><code>--batch-insert-threads</code></td><td>CPUs</td><td></td><td>Batch insert thread pool size (CPUs is the number of <strong>logical cores</strong> available to the current OS)</td></tr><tr><td><code>--single-insert-threads</code></td><td>8</td><td></td><td>Size of single insert thread pool</td></tr><tr><td><code>--max-conn</code></td><td>4 * CPUs</td><td></td><td>The maximum number of HTTP connections between HugeClient and HugeGraphServer, it is recommended to adjust this when <strong>adjusting threads</strong></td></tr><tr><td><code>--max-conn-per-route</code></td><td>2 * CPUs</td><td></td><td>The maximum number of HTTP connections for each route between HugeClient and HugeGraphServer, it is recommended to adjust this item at the same time when <strong>adjusting the thread</strong></td></tr><tr><td><code>--batch-size</code></td><td>500</td><td></td><td>The number of data items in each batch when importing data</td></tr><tr><td><code>--max-parse-errors</code></td><td>1</td><td></td><td>The maximum number of lines of data parsing errors allowed, and the program exits when this value is reached</td></tr><tr><td><code>--max-insert-errors</code></td><td>500</td><td></td><td>The maximum number of rows of data insertion errors allowed, and the program exits when this value is reached</td></tr><tr><td><code>--timeout</code></td><td>60</td><td></td><td>Timeout (seconds) for inserting results to return</td></tr><tr><td><code>--shutdown-timeout</code></td><td>10</td><td></td><td>Waiting time for multithreading to stop (seconds)</td></tr><tr><td><code>--retry-times</code></td><td>0</td><td></td><td>Number of retries when a specific exception occurs</td></tr><tr><td><code>--retry-interval</code></td><td>10</td><td></td><td>interval before retry (seconds)</td></tr><tr><td><code>--check-vertex</code></td><td>false</td><td></td><td>Whether to check whether the vertex connected by the edge exists when inserting the edge</td></tr><tr><td><code>--print-progress</code></td><td>true</td><td></td><td>Whether to print the number of imported items in the console in real time</td></tr><tr><td><code>--dry-run</code></td><td>false</td><td></td><td>Turn on this mode, only parsing but not importing, usually used for testing</td></tr><tr><td><code>--help</code></td><td>false</td><td></td><td>print help information</td></tr></tbody></table><h5 id=342-breakpoint-continuation-mode>3.4.2 Breakpoint Continuation Mode</h5><p>Usually, the Loader task takes a long time to execute. If the import interrupt process exits for some reason, and next time you want to continue the import from the interrupted point, this is the scenario of using breakpoint continuation.</p><p>The user sets the command line parameter &ndash;incremental-mode to true to open the breakpoint resume mode. The key to breakpoint continuation lies in the progress file. When the import process exits, the import progress at the time of exit will be recorded.
Recorded in the progress file, the progress file is located in the <code>${struct}</code> directory, the file name is like <code>load-progress ${date}</code>, ${struct} is the prefix of the mapping file, and ${date} is the start of the import
moment. For example, for an import task started at <code>2019-10-10 12:30:30</code>, the mapping file used is <code>struct-example.json</code>, then the path of the progress file is the same as struct-example.json
Sibling <code>struct-example/load-progress 2019-10-10 12:30:30</code>.</p><blockquote><p>Note: The generation of progress files is independent of whether &ndash;incremental-mode is turned on or not, and a progress file is generated at the end of each import.</p></blockquote><p>If the data file formats are all legal and the import task is stopped by the user (CTRL + C or kill, kill -9 is not supported), that is to say, if there is no error record, the next import only needs to be set
Continue for the breakpoint.</p><p>But if the limit of &ndash;max-parse-errors or &ndash;max-insert-errors is reached because too much data is invalid or network abnormality is reached, Loader will record these original rows that failed to insert into
In the failed file, after the user modifies the data lines in the failed file, set &ndash;reload-failure to true to import these &ldquo;failed files&rdquo; as input sources (does not affect the normal file import),
Of course, if there is still a problem with the modified data line, it will be logged again to the failure file (don&rsquo;t worry about duplicate lines).</p><p>Each vertex map or edge map will generate its own failure file when data insertion fails. The failure file is divided into a parsing failure file (suffix .parse-error) and an insertion failure file (suffix .insert-error).
They are stored in the <code>${struct}/current</code> directory. For example, there is a vertex mapping person and an edge mapping knows in the mapping file, each of which has some error lines. When the Loader exits, you will see the following files in the <code>${struct}/current</code> directory:</p><ul><li>person-b4cd32ab.parse-error: Vertex map person parses wrong data</li><li>person-b4cd32ab.insert-error: Vertex map person inserts wrong data</li><li>knows-eb6b2bac.parse-error: edge map knows parses wrong data</li><li>knows-eb6b2bac.insert-error: edge map knows inserts wrong data</li></ul><blockquote><p>.parse-error and .insert-error do not always exist together. Only lines with parsing errors will have .parse-error files, and only lines with insertion errors will have .insert-error files.</p></blockquote><h5 id=343-logs-directory-file-description>3.4.3 logs directory file description</h5><p>The log and error data during program execution will be written into hugegraph-loader.log file.</p><h5 id=344-execute-command>3.4.4 Execute command</h5><p>Run bin/hugegraph-loader and pass in parameters</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/hugegraph-loader -g <span style=color:#ce5c00;font-weight:700>{</span>GRAPH_NAME<span style=color:#ce5c00;font-weight:700>}</span> -f <span style=color:#4e9a06>${</span><span style=color:#000>INPUT_DESC_FILE</span><span style=color:#4e9a06>}</span> -s <span style=color:#4e9a06>${</span><span style=color:#000>SCHEMA_FILE</span><span style=color:#4e9a06>}</span> -h <span style=color:#ce5c00;font-weight:700>{</span>HOST<span style=color:#ce5c00;font-weight:700>}</span> -p <span style=color:#ce5c00;font-weight:700>{</span>PORT<span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=4-complete-example>4 Complete example</h3><p>Given below is an example in the example directory of the hugegraph-loader package. (<a href=https://github.com/apache/hugegraph-toolchain/tree/master/hugegraph-loader/assembly/static/example/file>GitHub address</a>)</p><h4 id=41-prepare-data>4.1 Prepare data</h4><p>Vertex file: <code>example/file/vertex_person.csv</code></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>marko,29,Beijing
</span></span><span style=display:flex><span>vadas,27,Hongkong
</span></span><span style=display:flex><span>josh,32,Beijing
</span></span><span style=display:flex><span>peter,35,Shanghai
</span></span><span style=display:flex><span>&#34;li,nary&#34;,26,&#34;Wu,han&#34;
</span></span><span style=display:flex><span>tom,null,NULL
</span></span></code></pre></div><p>Vertex file: <code>example/file/vertex_software.txt</code></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>id|name|lang|price|ISBN
</span></span><span style=display:flex><span>1|lop|java|328|ISBN978-7-107-18618-5
</span></span><span style=display:flex><span>2|ripple|java|199|ISBN978-7-100-13678-5
</span></span></code></pre></div><p>Edge file: <code>example/file/edge_knows.json</code></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160110&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.5</span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20130220&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Edge file: <code>example/file/edge_created.json</code></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;aname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;bname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;aname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;bname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20091111&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;aname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;bname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>{</span><span style=color:#204a87;font-weight:700>&#34;aname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;bname&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20170324&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.2</span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=42-write-schema>4.2 Write schema</h4><details><summary>Click to expand/collapse schema file: example/file/schema.groovy</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAgeAndCity&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;softwareByPrice&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knowsByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div></details><h4 id=43-write-the-input-source-mapping-file-examplefilestructjson>4.3 Write the input source mapping file <code>example/file/struct.json</code></h4><details><summary>Click to expand/collapse the input source mapping file example/file/struct.json</summary><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;example/file/vertex_person.csv&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CSV&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;charset&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UTF-8&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skipped_line&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;regex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;(^#|^//).*&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;null_values&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;NULL&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;null&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;example/file/vertex_software.txt&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;|&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;charset&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GBK&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;ISBN&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;example/file/edge_knows.json&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;JSON&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;yyyyMMdd&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;target_id&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;example/file/edge_created.json&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;JSON&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date_format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;yyyy-MM-dd&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;field_mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></details><h4 id=44-command-to-import>4.4 Command to import</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>sh bin/hugegraph-loader.sh -g hugegraph -f example/file/struct.json -s example/file/schema.groovy
</span></span></code></pre></div><p>After the import is complete, statistics similar to the following will appear:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>vertices/edges has been loaded this <span style=color:#204a87>time</span> : 8/6
</span></span><span style=display:flex><span>--------------------------------------------------
</span></span><span style=display:flex><span>count metrics
</span></span><span style=display:flex><span> input <span style=color:#204a87>read</span> success : <span style=color:#0000cf;font-weight:700>14</span>
</span></span><span style=display:flex><span> input <span style=color:#204a87>read</span> failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> vertex parse success : <span style=color:#0000cf;font-weight:700>8</span>
</span></span><span style=display:flex><span> vertex parse failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> vertex insert success : <span style=color:#0000cf;font-weight:700>8</span>
</span></span><span style=display:flex><span> vertex insert failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> edge parse success : <span style=color:#0000cf;font-weight:700>6</span>
</span></span><span style=display:flex><span> edge parse failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> edge insert success : <span style=color:#0000cf;font-weight:700>6</span>
</span></span><span style=display:flex><span> edge insert failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span></code></pre></div><h4 id=45-use-docker-to-load-data>4.5 Use Docker to load data</h4><h5 id=451-use-docker-exec-to-load-data-directly>4.5.1 Use docker exec to load data directly</h5><h6 id=4511-prepare-data>4.5.1.1 Prepare data</h6><p>If you just want to try out the loader, you can import the built-in example dataset without needing to prepare additional data yourself.</p><p>If using custom data, before importing data with the loader, we need to copy the data into the container.</p><p>First, following the steps in <a href=#41-prepare-data>4.1-4.3</a>, we can prepare the data and then use <code>docker cp</code> to copy the prepared data into the loader container.</p><p>Suppose we&rsquo;ve prepared the corresponding dataset following the above steps, stored in the <code>hugegraph-dataset</code> folder with the following file structure:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>tree -f hugegraph-dataset/
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>hugegraph-dataset
</span></span><span style=display:flex><span>├── hugegraph-dataset/edge_created.json
</span></span><span style=display:flex><span>├── hugegraph-dataset/edge_knows.json
</span></span><span style=display:flex><span>├── hugegraph-dataset/schema.groovy
</span></span><span style=display:flex><span>├── hugegraph-dataset/struct.json
</span></span><span style=display:flex><span>├── hugegraph-dataset/vertex_person.csv
</span></span><span style=display:flex><span>└── hugegraph-dataset/vertex_software.txt
</span></span></code></pre></div><p>Copy the files into the container.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>docker cp hugegraph-dataset loader:/loader/dataset
</span></span><span style=display:flex><span>docker <span style=color:#204a87>exec</span> -it loader ls /loader/dataset
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>edge_created.json edge_knows.json schema.groovy struct.json vertex_person.csv vertex_software.txt
</span></span></code></pre></div><h6 id=4512-data-loading>4.5.1.2 Data loading</h6><p>Taking the built-in example dataset as an example, we can use the following command to load the data.</p><p>If you need to import your custom dataset, you just need to modify the paths for <code>-f</code> (data script) and <code>-s</code> (schema) configurations.</p><p>&ldquo;You can refer to <a href=#341-parameter-description>3.4.1 Parameter description</a> for the rest of the parameters.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>docker <span style=color:#204a87>exec</span> -it loader bin/hugegraph-loader.sh -g hugegraph -f example/file/struct.json -s example/file/schema.groovy -h server -p <span style=color:#0000cf;font-weight:700>8080</span>
</span></span></code></pre></div><p>If loading a custom dataset, following the previous example, you would use:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>docker <span style=color:#204a87>exec</span> -it loader bin/hugegraph-loader.sh -g hugegraph -f /loader/dataset/struct.json -s /loader/dataset/schema.groovy -h server -p <span style=color:#0000cf;font-weight:700>8080</span>
</span></span></code></pre></div><blockquote><p>If <code>loader</code> and <code>server</code> are in the same Docker network, you can specify <code>-h {server_container_name}</code>; otherwise, you need to specify the IP of the <code>server</code> host (in our example, <code>server_container_name</code> is <code>server</code>).</p></blockquote><p>Then we can obverse the result:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>HugeGraphLoader worked in NORMAL MODE
</span></span><span style=display:flex><span>vertices/edges loaded this <span style=color:#204a87>time</span> : 8/6
</span></span><span style=display:flex><span>--------------------------------------------------
</span></span><span style=display:flex><span>count metrics
</span></span><span style=display:flex><span> input <span style=color:#204a87>read</span> success : <span style=color:#0000cf;font-weight:700>14</span>
</span></span><span style=display:flex><span> input <span style=color:#204a87>read</span> failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> vertex parse success : <span style=color:#0000cf;font-weight:700>8</span>
</span></span><span style=display:flex><span> vertex parse failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> vertex insert success : <span style=color:#0000cf;font-weight:700>8</span>
</span></span><span style=display:flex><span> vertex insert failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> edge parse success : <span style=color:#0000cf;font-weight:700>6</span>
</span></span><span style=display:flex><span> edge parse failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> edge insert success : <span style=color:#0000cf;font-weight:700>6</span>
</span></span><span style=display:flex><span> edge insert failure : <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span>--------------------------------------------------
</span></span><span style=display:flex><span>meter metrics
</span></span><span style=display:flex><span> total <span style=color:#204a87>time</span> : 0.199s
</span></span><span style=display:flex><span> <span style=color:#204a87>read</span> <span style=color:#204a87>time</span> : 0.046s
</span></span><span style=display:flex><span> load <span style=color:#204a87>time</span> : 0.153s
</span></span><span style=display:flex><span> vertex load <span style=color:#204a87>time</span> : 0.077s
</span></span><span style=display:flex><span> vertex load rate<span style=color:#ce5c00;font-weight:700>(</span>vertices/s<span style=color:#ce5c00;font-weight:700>)</span> : <span style=color:#0000cf;font-weight:700>103</span>
</span></span><span style=display:flex><span> edge load <span style=color:#204a87>time</span> : 0.112s
</span></span><span style=display:flex><span> edge load rate<span style=color:#ce5c00;font-weight:700>(</span>edges/s<span style=color:#ce5c00;font-weight:700>)</span> : <span style=color:#0000cf;font-weight:700>53</span>
</span></span></code></pre></div><p>You can also use <code>curl</code> or <code>hubble</code> to observe the import result. Here&rsquo;s an example using <code>curl</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>&gt; curl <span style=color:#4e9a06>&#34;http://localhost:8080/graphs/hugegraph/graph/vertices&#34;</span> <span style=color:#000;font-weight:700>|</span> gunzip
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;vertices&#34;</span>:<span style=color:#ce5c00;font-weight:700>[{</span><span style=color:#4e9a06>&#34;id&#34;</span>:1,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;software&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;lop&#34;</span>,<span style=color:#4e9a06>&#34;lang&#34;</span>:<span style=color:#4e9a06>&#34;java&#34;</span>,<span style=color:#4e9a06>&#34;price&#34;</span>:328.0<span style=color:#ce5c00;font-weight:700>}}</span>,<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;id&#34;</span>:2,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;software&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;ripple&#34;</span>,<span style=color:#4e9a06>&#34;lang&#34;</span>:<span style=color:#4e9a06>&#34;java&#34;</span>,<span style=color:#4e9a06>&#34;price&#34;</span>:199.0<span style=color:#ce5c00;font-weight:700>}}</span>,<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;id&#34;</span>:<span style=color:#4e9a06>&#34;1:tom&#34;</span>,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;person&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;tom&#34;</span><span style=color:#ce5c00;font-weight:700>}}</span>,<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;id&#34;</span>:<span style=color:#4e9a06>&#34;1:josh&#34;</span>,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;person&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;josh&#34;</span>,<span style=color:#4e9a06>&#34;age&#34;</span>:32,<span style=color:#4e9a06>&#34;city&#34;</span>:<span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>}}</span>,<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;id&#34;</span>:<span style=color:#4e9a06>&#34;1:marko&#34;</span>,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;person&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;marko&#34;</span>,<span style=color:#4e9a06>&#34;age&#34;</span>:29,<span style=color:#4e9a06>&#34;city&#34;</span>:<span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>}}</span>,<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;id&#34;</span>:<span style=color:#4e9a06>&#34;1:peter&#34;</span>,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;person&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;peter&#34;</span>,<span style=color:#4e9a06>&#34;age&#34;</span>:35,<span style=color:#4e9a06>&#34;city&#34;</span>:<span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#ce5c00;font-weight:700>}}</span>,<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;id&#34;</span>:<span style=color:#4e9a06>&#34;1:vadas&#34;</span>,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;person&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;vadas&#34;</span>,<span style=color:#4e9a06>&#34;age&#34;</span>:27,<span style=color:#4e9a06>&#34;city&#34;</span>:<span style=color:#4e9a06>&#34;Hongkong&#34;</span><span style=color:#ce5c00;font-weight:700>}}</span>,<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;id&#34;</span>:<span style=color:#4e9a06>&#34;1:li,nary&#34;</span>,<span style=color:#4e9a06>&#34;label&#34;</span>:<span style=color:#4e9a06>&#34;person&#34;</span>,<span style=color:#4e9a06>&#34;type&#34;</span>:<span style=color:#4e9a06>&#34;vertex&#34;</span>,<span style=color:#4e9a06>&#34;properties&#34;</span>:<span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;li,nary&#34;</span>,<span style=color:#4e9a06>&#34;age&#34;</span>:26,<span style=color:#4e9a06>&#34;city&#34;</span>:<span style=color:#4e9a06>&#34;Wu,han&#34;</span><span style=color:#ce5c00;font-weight:700>}}]}</span>
</span></span></code></pre></div><p>If you want to check the import result of edges, you can use <code>curl "http://localhost:8080/graphs/hugegraph/graph/edges" | gunzip</code>.</p><h5 id=452-enter-the-docker-container-to-load-data>4.5.2 Enter the docker container to load data</h5><p>Besides using <code>docker exec</code> directly for data import, we can also enter the container for data loading. The basic process is similar to <a href=#451-use-docker-exec-to-load-data-directly>4.5.1</a>.</p><p>Enter the container by <code>docker exec -it loader bash</code> and execute the command:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>sh bin/hugegraph-loader.sh -g hugegraph -f example/file/struct.json -s example/file/schema.groovy -h server -p <span style=color:#0000cf;font-weight:700>8080</span>
</span></span></code></pre></div><p>The results of the execution will be similar to those shown in <a href=#451-use-docker-exec-to-load-data-directly>4.5.1</a>.</p><h4 id=46-import-data-by-spark-loader>4.6 Import data by spark-loader</h4><blockquote><p>Spark version: Spark 3+, other versions has not been tested.<br>HugeGraph Toolchain version: toolchain-1.0.0</p></blockquote><p>The parameters of <code>spark-loader</code> are divided into two parts. Note: Because the abbreviations of
these two parameter names have overlapping parts, please use the full name of the parameter.
And there is no need to guarantee the order between the two parameters.</p><ul><li>hugegraph parameters (Reference: <a href=https://hugegraph.apache.org/docs/quickstart/hugegraph-loader/#341-parameter-description>hugegraph-loader parameter description</a> )</li><li>Spark task submission parameters (Reference: <a href=https://spark.apache.org/docs/3.3.0/submitting-applications.html#content>Submitting Applications</a>)</li></ul><p>Example:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>sh bin/hugegraph-spark-loader.sh --master yarn <span style=color:#4e9a06>\
</span></span></span><span style=display:flex><span><span style=color:#4e9a06></span>--deploy-mode cluster --name spark-hugegraph-loader --file ./hugegraph.json <span style=color:#4e9a06>\
</span></span></span><span style=display:flex><span><span style=color:#4e9a06></span>--username admin --token admin --host xx.xx.xx.xx --port <span style=color:#0000cf;font-weight:700>8093</span> <span style=color:#4e9a06>\
</span></span></span><span style=display:flex><span><span style=color:#4e9a06></span>--graph graph-test --num-executors <span style=color:#0000cf;font-weight:700>6</span> --executor-cores <span style=color:#0000cf;font-weight:700>16</span> --executor-memory 15g
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-751ed124ec6dbb96d5e65c62dc9d4e85>3.3 - HugeGraph-Hubble Quick Start</h1><h3 id=1-hugegraph-hubble-overview>1 HugeGraph-Hubble Overview</h3><blockquote><p><strong>Note:</strong> The current version of Hubble has not yet added Auth/Login related interfaces and
standalone protection, it will be added in the next Release version (≥ 1.5).
Please be careful not to expose it in a public network environment or untrusted networks to
avoid related SEC issues (you can also use IP & port whitelist + HTTPS)</p></blockquote><p><strong>HugeGraph-Hubble</strong> is HugeGraph&rsquo;s one-stop visual analysis platform. The platform covers the whole
process from data modeling, to efficient data import, to real-time and offline analysis of data, and
unified management of graphs, realizing the whole process wizard of graph application. It is designed
to improve the user&rsquo;s use fluency, lower the user&rsquo;s use threshold, and provide a more efficient and easy-to-use user experience.</p><p>The platform mainly includes the following modules:</p><h5 id=graph-management>Graph Management</h5><p>The graph management module realizes the unified management of multiple graphs and graph access, editing, deletion, and query by creating graph and connecting the platform and graph data.</p><h5 id=metadata-modeling>Metadata Modeling</h5><p>The metadata modeling module realizes the construction and management of graph models by creating attribute libraries, vertex types, edge types, and index types. The platform provides two modes, list mode and graph mode, which can display the metadata model in real time, which is more intuitive. At the same time, it also provides a metadata reuse function across graphs, which saves the tedious and repetitive creation process of the same metadata, greatly improves modeling efficiency and enhances ease of use.</p><h5 id=graph-analysis>Graph Analysis</h5><p>By inputting the graph traversal language Gremlin, high-performance general analysis of graph data can be realized, and functions such as customized multidimensional path query of vertices can be provided, and three kinds of graph result display methods are provided, including: graph form, table form, Json form, and multidimensional display. The data form meets the needs of various scenarios used by users. It provides functions such as running records and collection of common statements, realizing the traceability of graph operations, and the reuse and sharing of query input, which is fast and efficient. It supports the export of graph data, and the export format is Json format.</p><h5 id=task-management>Task Management</h5><p>For Gremlin tasks that need to traverse the whole graph, index creation and reconstruction,
and other time-consuming asynchronous tasks, the platform provides corresponding task management
functions to achieve unified management and result viewing of asynchronous tasks.</p><h5 id=data-import>Data Import</h5><blockquote><p>&ldquo;Note: The data import function is currently suitable for preliminary use. For formal data import,
please use <a href=/docs/quickstart/hugegraph-loader>hugegraph-loader</a>, which has much better performance, stability, and functionality.&rdquo;</p></blockquote><p>Data import is to convert the user&rsquo;s business data into the vertices and edges of the graph and
insert it into the graph database. The platform provides a wizard-style visual import module.
By creating import tasks, the management of import tasks and the parallel operation of multiple
import tasks are realized. Improve import performance. After entering the import task, you only
need to follow the platform step prompts, upload files as needed, and fill in the content to easily
implement the import process of graph data. At the same time, it supports breakpoint resuming,
error retry mechanism, etc., which reduces import costs and improves efficiency.</p><h3 id=2-deploy>2 Deploy</h3><p>There are three ways to deploy <code>hugegraph-hubble</code></p><ul><li>Use Docker (Convenient for Test/Dev)</li><li>Download the Toolchain binary package</li><li>Source code compilation</li></ul><h4 id=21-use-docker-convenient-for-testdev>2.1 Use docker (Convenient for Test/Dev)</h4><blockquote><p><strong>Special Note</strong>: If you are starting <code>hubble</code> with Docker, and <code>hubble</code> and the server are on the same host. When configuring the hostname for the graph on the Hubble web page, please do not directly set it to <code>localhost/127.0.0.1</code>. This will refer to the <code>hubble</code> container internally rather than the host machine, resulting in a connection failure to the server.</p><p>If <code>hubble</code> and <code>server</code> is in the same docker network, we <strong>recommend</strong> using the <code>container_name</code> (in our example, it is <code>server</code>) as the hostname, and <code>8080</code> as the port. Or you can use the <strong>host IP</strong> as the hostname, and the port is configured by the host for the server.</p></blockquote><p>We can use <code>docker run -itd --name=hubble -p 8088:8088 hugegraph/hubble</code> to quick start <a href=https://hub.docker.com/r/hugegraph/hubble>hubble</a>.</p><p>Alternatively, you can use Docker Compose to start <code>hubble</code>. Additionally, if <code>hubble</code> and the graph are in the same Docker network, you can access the graph using the container name of the graph, eliminating the need for the host machine&rsquo;s IP address.</p><p>Use <code>docker-compose up -d</code><code>docker-compose.yml</code> is following:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#204a87;font-weight:700>version</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#39;3&#39;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>services</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>server</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hugegraph</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>server</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>8080</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8080</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hubble</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hubble</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hubble</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>8088</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8088</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><blockquote><p>Note:</p><ol><li><p>The docker image of hugegraph-hubble is a convenience release to start hugegraph-hubble quickly, but not <strong>official distribution</strong> artifacts. You can find more details from <a href=https://infra.apache.org/release-distribution.html#dockerhub>ASF Release Distribution Policy</a>.</p></li><li><p>Recommand to use <code>release tag</code>(like <code>1.2.0</code>) for the stable version. Use <code>latest</code> tag to experience the newest functions in development.</p></li></ol></blockquote><h4 id=22-download-the-toolchain-binary-package>2.2 Download the Toolchain binary package</h4><p><code>hubble</code> is in the <code>toolchain</code> project. First, download the binary tar tarball</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>/apache-hugegraph-toolchain-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz
</span></span><span style=display:flex><span>tar -xvf apache-hugegraph-toolchain-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz
</span></span><span style=display:flex><span><span style=color:#204a87>cd</span> apache-hugegraph-toolchain-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>.tar.gz/apache-hugegraph-hubble-incubating-<span style=color:#ce5c00;font-weight:700>{</span>version<span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><p>Run <code>hubble</code></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hubble.sh
</span></span></code></pre></div><p>Then, we can see:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>starting HugeGraphHubble ..............timed out with http status <span style=color:#0000cf;font-weight:700>502</span>
</span></span><span style=display:flex><span>2023-08-30 20:38:34 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> o.a.h.HugeGraphHubble <span style=color:#ce5c00;font-weight:700>[]</span> - Starting HugeGraphHubble v1.0.0 on cpu05 with PID xxx <span style=color:#ce5c00;font-weight:700>(</span>~/apache-hugegraph-toolchain-incubating-1.0.0/apache-hugegraph-hubble-incubating-1.0.0/lib/hubble-be-1.0.0.jar started by <span style=color:#000>$USER</span> in ~/apache-hugegraph-toolchain-incubating-1.0.0/apache-hugegraph-hubble-incubating-1.0.0<span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>...
</span></span><span style=display:flex><span>2023-08-30 20:38:38 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> c.z.h.HikariDataSource <span style=color:#ce5c00;font-weight:700>[]</span> - hugegraph-hubble-HikariCP - Start completed.
</span></span><span style=display:flex><span>2023-08-30 20:38:41 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> o.a.c.h.Http11NioProtocol <span style=color:#ce5c00;font-weight:700>[]</span> - Starting ProtocolHandler <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#4e9a06>&#34;http-nio-0.0.0.0-8088&#34;</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span>2023-08-30 20:38:41 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO <span style=color:#ce5c00;font-weight:700>]</span> o.a.h.HugeGraphHubble <span style=color:#ce5c00;font-weight:700>[]</span> - Started HugeGraphHubble in 7.379 seconds <span style=color:#ce5c00;font-weight:700>(</span>JVM running <span style=color:#204a87;font-weight:700>for</span> 8.499<span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><p>Then use a web browser to access <code>ip:8088</code> and you can see the <code>Hubble</code> page. You can stop the service using bin/stop-hubble.sh.</p><h4 id=23-source-code-compilation>2.3 Source code compilation</h4><p><strong>Note</strong>: Compiling Hubble requires the user&rsquo;s local environment to have Node.js V16.x and yarn installed.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>apt install curl build-essential
</span></span><span style=display:flex><span>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh <span style=color:#000;font-weight:700>|</span> bash
</span></span><span style=display:flex><span><span style=color:#204a87>source</span> ~/.bashrc
</span></span><span style=display:flex><span>nvm install <span style=color:#0000cf;font-weight:700>16</span>
</span></span></code></pre></div><p>Then, verify that the installed Node.js version is 16.x (please note that higher Node version may cause conflicts).</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>node -v
</span></span></code></pre></div><p>install <code>yarn</code> by the command below:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>npm install -g yarn
</span></span></code></pre></div><p>Download the toolchain source code.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>git clone https://github.com/apache/hugegraph-toolchain.git
</span></span></code></pre></div><p>Compile <code>hubble</code>. It depends on the loader and client, so you need to build these dependencies in advance during the compilation process (you can skip this step later).</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> incubator-hugegraph-toolchain
</span></span><span style=display:flex><span>sudo pip install -r hugegraph-hubble/hubble-dist/assembly/travis/requirements.txt
</span></span><span style=display:flex><span>mvn install -pl hugegraph-client,hugegraph-loader -am -Dmaven.javadoc.skip<span style=color:#ce5c00;font-weight:700>=</span><span style=color:#204a87>true</span> -DskipTests -ntp
</span></span><span style=display:flex><span><span style=color:#204a87>cd</span> hugegraph-hubble
</span></span><span style=display:flex><span>mvn -e compile package -Dmaven.javadoc.skip<span style=color:#ce5c00;font-weight:700>=</span><span style=color:#204a87>true</span> -Dmaven.test.skip<span style=color:#ce5c00;font-weight:700>=</span><span style=color:#204a87>true</span> -ntp
</span></span><span style=display:flex><span><span style=color:#204a87>cd</span> apache-hugegraph-hubble-incubating*
</span></span></code></pre></div><p>Run <code>hubble</code></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-hubble.sh -d
</span></span></code></pre></div><h3 id=3platform-workflow>3 Platform Workflow</h3><p>The module usage process of the platform is as follows:</p><div style=text-align:center><img src=/docs/images/images-hubble/2平台使用流程.png alt=image></div><h3 id=4platform-instructions>4 Platform Instructions</h3><h4 id=41graph-management>4.1 Graph Management</h4><h5 id=411graph-creation>4.1.1 Graph creation</h5><p>Under the graph management module, click [Create graph], and realize the connection of multiple graphs by filling in the graph ID, graph name, host name, port number, username, and password information.</p><div style=text-align:center><img src=/docs/images/images-hubble/311图创建.png alt=image></div><p>Create graph by filling in the content as follows:</p><center><img src=/docs/images/images-hubble/311图创建2.png alt=image></center><blockquote><p><strong>Special Note</strong>: If you are starting <code>hubble</code> with Docker, and <code>hubble</code> and the server are on the same host. When configuring the hostname for the graph on the Hubble web page, please do not directly set it to <code>localhost/127.0.0.1</code>. If <code>hubble</code> and <code>server</code> is in the same docker network, we <strong>recommend</strong> using the <code>container_name</code> (in our example, it is <code>graph</code>) as the hostname, and <code>8080</code> as the port. Or you can use the <strong>host IP</strong> as the hostname, and the port is configured by the host for the server.</p></blockquote><h5 id=412graph-access>4.1.2 Graph Access</h5><p>Realize the information access of the graph space. After entering, you can perform operations such as multidimensional query analysis, metadata management, data import, and algorithm analysis of the graph.</p><center><img src=/docs/images/images-hubble/312图访问.png alt=image></center><h5 id=413graph-management>4.1.3 Graph management</h5><ol><li>Users can achieve unified management of graphs through overview, search, and information editing and deletion of single graphs.</li><li>Search range: You can search for the graph name and ID.</li></ol><center><img src=/docs/images/images-hubble/313图管理.png alt=image></center><h4 id=42metadata-modeling-list--graph-mode>4.2 Metadata Modeling (list + graph mode)</h4><h5 id=421module-entry>4.2.1 Module entry</h5><p>Left navigation:</p><center><img src=/docs/images/images-hubble/321元数据入口.png alt=image></center><h5 id=422property-type>4.2.2 Property type</h5><h6 id=4221create-type>4.2.2.1 Create type</h6><ol><li>Fill in or select the attribute name, data type, and cardinality to complete the creation of the attribute.</li><li>Created attributes can be used as attributes of vertex type and edge type.</li></ol><p>List mode:</p><center><img src=/docs/images/images-hubble/3221属性创建.png alt=image></center><p>Graph mode:</p><center><img src=/docs/images/images-hubble/3221属性创建2.png alt=image></center><h6 id=4222reuse>4.2.2.2 Reuse</h6><ol><li>The platform provides the [Reuse] function, which can directly reuse the metadata of other graphs.</li><li>Select the graph ID that needs to be reused, and continue to select the attributes that need to be reused. After that, the platform will check whether there is a conflict. After passing, the metadata can be reused.</li></ol><p>Select reuse items:</p><center><img src=/docs/images/images-hubble/3222属性复用.png alt=image></center><p>Check reuse items:</p><center><img src=/docs/images/images-hubble/3222属性复用2.png alt=image></center><h6 id=4223management>4.2.2.3 Management</h6><ol><li>You can delete a single item or delete it in batches in the attribute list.</li></ol><h5 id=423vertex-type>4.2.3 Vertex type</h5><h6 id=4231create-type>4.2.3.1 Create type</h6><ol><li>Fill in or select the vertex type name, ID strategy, association attribute, primary key attribute, vertex style, content displayed below the vertex in the query result, and index information: including whether to create a type index, and the specific content of the attribute index, complete the vertex Type creation.</li></ol><p>List mode:</p><center><img src=/docs/images/images-hubble/3231顶点创建.png alt=image></center><p>Graph mode:</p><center><img src=/docs/images/images-hubble/3231顶点创建2.png alt=image></center><h6 id=4232-reuse>4.2.3.2 Reuse</h6><ol><li>The multiplexing of vertex types will reuse the attributes and attribute indexes associated with this type together.</li><li>The reuse method is similar to the property reuse, see 3.2.2.2.</li></ol><h6 id=4233-administration>4.2.3.3 Administration</h6><ol><li><p>Editing operations are available. The vertex style, association type, vertex display content, and attribute index can be edited, and the rest cannot be edited.</p></li><li><p>You can delete a single item or delete it in batches.</p></li></ol><center><img src=/docs/images/images-hubble/3233顶点删除.png alt=image></center><h5 id=424-edge-types>4.2.4 Edge Types</h5><h6 id=4241-create>4.2.4.1 Create</h6><ol><li>Fill in or select the edge type name, start point type, end point type, associated attributes, whether to allow multiple connections, edge style, content displayed below the edge in the query result, and index information: including whether to create a type index, and attribute index The specific content, complete the creation of the edge type.</li></ol><p>List mode:</p><center><img src=/docs/images/images-hubble/3241边创建.png alt=image></center><p>Graph mode:</p><center><img src=/docs/images/images-hubble/3241边创建2.png alt=image></center><h6 id=4242-reuse>4.2.4.2 Reuse</h6><ol><li>The reuse of the edge type will reuse the start point type, end point type, associated attribute and attribute index of this type.</li><li>The reuse method is similar to the property reuse, see 3.2.2.2.</li></ol><h6 id=4243-administration>4.2.4.3 Administration</h6><ol><li>Editing operations are available. Edge styles, associated attributes, edge display content, and attribute indexes can be edited, and the rest cannot be edited, the same as the vertex type.</li><li>You can delete a single item or delete it in batches.</li></ol><h5 id=425-index-types>4.2.5 Index Types</h5><p>Displays vertex and edge indices for vertex types and edge types.</p><h4 id=43-data-import>4.3 Data Import</h4><blockquote><p><strong>Note</strong>:currently, we recommend to use <a href=/en/docs/quickstart/hugegraph-loader>hugegraph-loader</a> to import data formally. The built-in import of <code>hubble</code> is used for <strong>testing</strong> and <strong>getting started</strong>.</p></blockquote><p>The usage process of data import is as follows:</p><center><img src=/docs/images/images-hubble/33导入流程.png alt=image></center><h5 id=431module-entrance>4.3.1 Module entrance</h5><p>Left navigation:</p><center><img src=/docs/images/images-hubble/331导入入口.png alt=image></center><h5 id=432-create-task>4.3.2 Create task</h5><ol><li>Fill in the task name and remarks (optional) to create an import task.</li><li>Multiple import tasks can be created and imported in parallel.</li></ol><center><img src=/docs/images/images-hubble/332创建任务.png alt=image></center><h5 id=433-uploading-files>4.3.3 Uploading files</h5><ol><li>Upload the file that needs to be composed. The currently supported format is CSV, which will be updated continuously in the future.</li><li>Multiple files can be uploaded at the same time.</li></ol><center><img src=/docs/images/images-hubble/333上传文件.png alt=image></center><h5 id=434-setting-up-data-mapping>4.3.4 Setting up data mapping</h5><ol><li><p>Set up data mapping for uploaded files, including file settings and type settings</p></li><li><p>File settings: Check or fill in whether to include the header, separator, encoding format and other settings of the file itself, all set the default values, no need to fill in manually</p></li><li><p>Type setting:</p><ol><li><p>Vertex map and edge map:</p><p>【Vertex Type】: Select the vertex type, and upload the column data in the file for its ID mapping;</p><p>【Edge Type】: Select the edge type and map the column data of the uploaded file to the ID column of its start point type and end point type;</p></li><li><p>Mapping settings: upload the column data in the file for the attribute mapping of the selected vertex type. Here, if the attribute name is the same as the header name of the file, the mapping attribute can be automatically matched, and there is no need to manually fill in the selection.</p></li><li><p>After completing the setting, the setting list will be displayed before proceeding to the next step. It supports the operations of adding, editing and deleting mappings.</p></li></ol></li></ol><p>Fill in the settings map:</p><center><img src=/docs/images/images-hubble/334设置映射.png alt=image></center><p>Mapping list:</p><center><img src=/docs/images/images-hubble/334设置映射2.png alt=image></center><h5 id=435-import-data>4.3.5 Import data</h5><p>Before importing, you need to fill in the import setting parameters. After filling in, you can start importing data into the gallery.</p><ol><li>Import settings</li></ol><ul><li>The import setting parameter items are as shown in the figure below, all set the default value, no need to fill in manually</li></ul><center><img src=/docs/images/images-hubble/335导入设置.png alt=image></center><ol start=2><li>Import details</li></ol><ul><li>Click Start Import to start the file import task</li><li>The import details provide the mapping type, import speed, import progress, time-consuming and the specific status of the current task set for each uploaded file, and can pause, resume, stop and other operations for each task</li><li>If the import fails, you can view the specific reason</li></ul><center><img src=/docs/images/images-hubble/335导入详情.png alt=image></center><h4 id=44-data-analysis>4.4 Data Analysis</h4><h5 id=441-module-entry>4.4.1 Module entry</h5><p>Left navigation:</p><center><img src=/docs/images/images-hubble/341分析入口.png alt=image></center><h5 id=442-multi-image-switching>4.4.2 Multi-image switching</h5><p>By switching the entrance on the left, flexibly switch the operation space of multiple graphs</p><center><img src=/docs/images/images-hubble/342多图切换.png alt=image></center><h5 id=443-graph-analysis-and-processing>4.4.3 Graph Analysis and Processing</h5><p>HugeGraph supports Gremlin, a graph traversal query language of Apache TinkerPop3. Gremlin is a general graph database query language. By entering Gremlin statements and clicking execute, you can perform query and analysis operations on graph data, and create and delete vertices/edges. , vertex/edge attribute modification, etc.</p><p>After Gremlin query, below is the graph result display area, which provides 3 kinds of graph result display modes: [Graph Mode], [Table Mode], [Json Mode].</p><p>Support zoom, center, full screen, export and other operations.</p><p>【Picture Mode】</p><center><img src=/docs/images/images-hubble/343图分析-图.png alt=image></center><p>【Table mode】</p><center><img src=/docs/images/images-hubble/343图分析-表格.png alt=image></center><p>【Json mode】</p><center><img src=/docs/images/images-hubble/343图分析-json.png alt=image></center><h5 id=444-data-details>4.4.4 Data Details</h5><p>Click the vertex/edge entity to view the data details of the vertex/edge, including: vertex/edge type, vertex ID, attribute and corresponding value, expand the information display dimension of the graph, and improve the usability.</p><h5 id=445-multidimensional-path-query-of-graph-results>4.4.5 Multidimensional Path Query of Graph Results</h5><p>In addition to the global query, in-depth customized query and hidden operations can be performed for the vertices in the query result to realize customized mining of graph results.</p><p>Right-click a vertex, and the menu entry of the vertex appears, which can be displayed, inquired, hidden, etc.</p><ul><li>Expand: Click to display the vertices associated with the selected point.</li><li>Query: By selecting the edge type and edge direction associated with the selected point, and then selecting its attributes and corresponding filtering rules under this condition, a customized path display can be realized.</li><li>Hide: When clicked, hides the selected point and its associated edges.</li></ul><p>Double-clicking a vertex also displays the vertex associated with the selected point.</p><center><img src=/docs/images/images-hubble/345定制路径查询.png alt=image></center><h5 id=446-add-vertexedge>4.4.6 Add vertex/edge</h5><h6 id=4461-added-vertex>4.4.6.1 Added vertex</h6><p>In the graph area, two entries can be used to dynamically add vertices, as follows:</p><ol><li>Click on the graph area panel, the Add Vertex entry appears</li><li>Click the first icon in the action bar in the upper right corner</li></ol><p>Complete the addition of vertices by selecting or filling in the vertex type, ID value, and attribute information.</p><p>The entry is as follows:</p><center><img src=/docs/images/images-hubble/346新增顶点.png alt=image></center><p>Add the vertex content as follows:</p><center><img src=/docs/images/images-hubble/346新增顶点2.png alt=image></center><h6 id=4462-add-edge>4.4.6.2 Add edge</h6><p>Right-click a vertex in the graph result to add the outgoing or incoming edge of that point.</p><h5 id=447-execute-the-query-of-records-and-favorites>4.4.7 Execute the query of records and favorites</h5><ol><li>Record each query record at the bottom of the graph area, including: query time, execution type, content, status, time-consuming, as well as [collection] and [load] operations, to achieve a comprehensive record of graph execution, with traces to follow, and Can quickly load and reuse execution content</li><li>Provides the function of collecting sentences, which can be used to collect frequently used sentences, which is convenient for fast calling of high-frequency sentences.</li></ol><center><img src=/docs/images/images-hubble/347收藏.png alt=image></center><h4 id=45-task-management>4.5 Task Management</h4><h5 id=451-module-entry>4.5.1 Module entry</h5><p>Left navigation:</p><center><img src=/docs/images/images-hubble/351任务管理入口.png alt=image></center><h5 id=452-task-management>4.5.2 Task Management</h5><ol><li>Provide unified management and result viewing of asynchronous tasks. There are 4 types of asynchronous tasks, namely:</li></ol><ul><li>gremlin: Gremlin tasks</li><li>algorithm: OLAP algorithm task</li><li>remove_schema: remove metadata</li><li>rebuild_index: rebuild the index</li></ul><ol start=2><li>The list displays the asynchronous task information of the current graph, including: task ID, task name, task type, creation time, time-consuming, status, operation, and realizes the management of asynchronous tasks.</li><li>Support filtering by task type and status</li><li>Support searching for task ID and task name</li><li>Asynchronous tasks can be deleted or deleted in batches</li></ol><center><img src=/docs/images/images-hubble/352任务列表.png alt=image></center><h5 id=453-gremlin-asynchronous-tasks>4.5.3 Gremlin asynchronous tasks</h5><ol><li>Create a task</li></ol><ul><li>The data analysis module currently supports two Gremlin operations, Gremlin query and Gremlin task; if the user switches to the Gremlin task, after clicking execute, an asynchronous task will be created in the asynchronous task center;</li></ul><ol start=2><li>Task submission</li></ol><ul><li>After the task is submitted successfully, the graph area returns the submission result and task ID</li></ul><ol start=3><li>Mission details</li></ol><ul><li>Provide [View] entry, you can jump to the task details to view the specific execution of the current task After jumping to the task center, the currently executing task line will be displayed directly</li></ul><center><img src=/docs/images/images-hubble/353gremlin任务.png alt=image></center><p>Click to view the entry to jump to the task management list, as follows:</p><center><img src=/docs/images/images-hubble/353gremlin任务2.png alt=image></center><ol start=4><li>View the results</li></ol><ul><li>The results are displayed in the form of json</li></ul><h5 id=454-olap-algorithm-tasks>4.5.4 OLAP algorithm tasks</h5><p>There is no visual OLAP algorithm execution on Hubble. You can call the RESTful API to perform OLAP algorithm tasks, find the corresponding tasks by ID in the task management, and view the progress and results.</p><h5 id=455-delete-metadata-rebuild-index>4.5.5 Delete metadata, rebuild index</h5><ol><li>Create a task</li></ol><ul><li>In the metadata modeling module, when deleting metadata, an asynchronous task for deleting metadata can be created</li></ul><center><img src=/docs/images/images-hubble/355删除元数据.png alt=image></center><ul><li>When editing an existing vertex/edge type operation, when adding an index, an asynchronous task of creating an index can be created</li></ul><center><img src=/docs/images/images-hubble/355构建索引.png alt=image></center><ol start=2><li>Task details</li></ol><ul><li>After confirming/saving, you can jump to the task center to view the details of the current task</li></ul><center><img src=/docs/images/images-hubble/355任务详情.png alt=image></center></div><div class=td-content style=page-break-before:always><h1 id=pg-9cbf1b01e876dc8cdc2da1c17759eed3>3.4 - HugeGraph-Client Quick Start</h1><h3 id=1-overview-of-hugegraph>1 Overview Of Hugegraph</h3><p><a href=https://github.com/apache/hugegraph-toolchain>HugeGraph-Client</a> sends HTTP request to HugeGraph-Server to obtain and parse the execution result of Server.
We support HugeGraph-Client for Java/Go/<a href=https://github.com/apache/incubator-hugegraph-ai/tree/main/hugegraph-python-client>Python</a> language.
You can use <a href=/cn/docs/clients/hugegraph-client>Client-API</a> to write code to operate HugeGraph, such as adding, deleting, modifying, and querying schema and graph data, or executing gremlin statements.</p><blockquote><p><a href=https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client-go/README.en.md>HugeGraph client SDK tool based on Go language</a> (version >=1.2.0)</p></blockquote><h3 id=2-what-you-need>2 What You Need</h3><ul><li>Java 11 (also support Java 8)</li><li>Maven 3.5+</li></ul><h3 id=3-how-to-use>3 How To Use</h3><p>The basic steps to use HugeGraph-Client are as follows:</p><ul><li>Build a new Maven project by IDEA or Eclipse</li><li>Add HugeGraph-Client dependency in pom file;</li><li>Create an object to invoke the interface of HugeGraph-Client</li></ul><p>See the complete example in the following section for the detail.</p><h3 id=4-complete-example>4 Complete Example</h3><h4 id=41-build-new-maven-project>4.1 Build New Maven Project</h4><p>Using IDEA or Eclipse to create the project:</p><ul><li><a href=http://www.vogella.com/tutorials/EclipseMaven/article.html>Build by Eclipse</a></li><li><a href=https://vaadin.com/docs/-/part/framework/getting-started/getting-started-idea.html>Build by Intellij Idea</a></li></ul><h4 id=42-add-hugegraph-client-dependency-in-pom>4.2 Add Hugegraph-Client Dependency In POM</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=display:flex><span><span style=color:#204a87;font-weight:700>&lt;dependencies&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;dependency&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;groupId&gt;</span>org.apache.hugegraph<span style=color:#204a87;font-weight:700>&lt;/groupId&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;artifactId&gt;</span>hugegraph-client<span style=color:#204a87;font-weight:700>&lt;/artifactId&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>&lt;!-- Update to the latest release version --&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;version&gt;</span>1.3.0<span style=color:#204a87;font-weight:700>&lt;/version&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;/dependency&gt;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&lt;/dependencies&gt;</span>
</span></span></code></pre></div><blockquote><p>Note: The versions of all graph components remain consistent</p></blockquote><h4 id=43-example>4.3 Example</h4><h5 id=431-singleexample>4.3.1 SingleExample</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.io.IOException</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.util.Iterator</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.util.List</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.driver.GraphManager</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.driver.GremlinManager</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.driver.HugeClient</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.driver.SchemaManager</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.constant.T</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.graph.Edge</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.graph.Path</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.graph.Vertex</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.gremlin.Result</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.gremlin.ResultSet</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>SingleExample</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>[]</span> <span style=color:#000>args</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#204a87;font-weight:700>throws</span> <span style=color:#000>IOException</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// If connect failed will throw a exception.
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>HugeClient</span> <span style=color:#000>hugeClient</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>HugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>builder</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;http://localhost:8080&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>build</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>SchemaManager</span> <span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDate</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAgeAndCity&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;softwareByPrice&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knowsByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>GraphManager</span> <span style=color:#000>graph</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>graph</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>marko</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>LABEL</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>29</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>vadas</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>LABEL</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>27</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>lop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>LABEL</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>328</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>josh</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>LABEL</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>32</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>ripple</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>LABEL</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>199</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>peter</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>LABEL</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>35</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2016-01-10&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>5</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2013-02-20&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>0</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2017-12-10&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>4</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2009-11-11&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>4</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2017-12-10&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>0</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2017-03-24&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>2</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>GremlinManager</span> <span style=color:#000>gremlin</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>gremlin</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;==== Path ====&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>ResultSet</span> <span style=color:#000>resultSet</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>gremlin</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;g.V().outE().path()&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>execute</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>Iterator</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>Result</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>results</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>resultSet</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>iterator</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>results</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>forEachRemaining</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>result</span> <span style=color:#ce5c00;font-weight:700>-&gt;</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>result</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getObject</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>getClass</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#000>Object</span> <span style=color:#000>object</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>result</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getObject</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>if</span> <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>object</span> <span style=color:#204a87;font-weight:700>instanceof</span> <span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(((</span><span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#000>object</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span> <span style=color:#204a87;font-weight:700>else</span> <span style=color:#204a87;font-weight:700>if</span> <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>object</span> <span style=color:#204a87;font-weight:700>instanceof</span> <span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(((</span><span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#000>object</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span> <span style=color:#204a87;font-weight:700>else</span> <span style=color:#204a87;font-weight:700>if</span> <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>object</span> <span style=color:#204a87;font-weight:700>instanceof</span> <span style=color:#000>Path</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>List</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>Object</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>elements</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#ce5c00;font-weight:700>((</span><span style=color:#000>Path</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#000>object</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>objects</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>elements</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>forEach</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>element</span> <span style=color:#ce5c00;font-weight:700>-&gt;</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>element</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getClass</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>element</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>});</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span> <span style=color:#204a87;font-weight:700>else</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>object</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>});</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>close</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=432-batchexample>4.3.2 BatchExample</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.util.ArrayList</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.util.List</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.driver.GraphManager</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.driver.HugeClient</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.driver.SchemaManager</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.graph.Edge</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.structure.graph.Vertex</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>BatchExample</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>[]</span> <span style=color:#000>args</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// If connect failed will throw a exception.
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>HugeClient</span> <span style=color:#000>hugeClient</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>HugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>builder</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;http://localhost:8080&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>build</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>SchemaManager</span> <span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDate</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>append</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;softwareByPrice&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// get schema object by name
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getPropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>));</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>));</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>));</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#ce5c00;font-weight:700>));</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// list all schema objects
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getPropertyKeys</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabels</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabels</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabels</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>GraphManager</span> <span style=color:#000>graph</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>graph</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>marko</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>29</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>vadas</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>27</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>lop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>328</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>josh</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>32</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>ripple</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>199</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>peter</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>35</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Edge</span> <span style=color:#000>markoKnowsVadas</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>source</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>target</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2016-01-10&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Edge</span> <span style=color:#000>markoKnowsJosh</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>source</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>target</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2013-02-20&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Edge</span> <span style=color:#000>markoCreateLop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>source</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>target</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2017-12-10&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Edge</span> <span style=color:#000>joshCreateRipple</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>source</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>target</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2017-12-10&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Edge</span> <span style=color:#000>joshCreateLop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>source</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>target</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;2009-11-11&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Edge</span> <span style=color:#000>peterCreateLop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>source</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>target</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>property</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2017-03-24&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>List</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>Vertex</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>vertices</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>ArrayList</span><span style=color:#ce5c00;font-weight:700>&lt;&gt;();</span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>List</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>Edge</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>edges</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>ArrayList</span><span style=color:#ce5c00;font-weight:700>&lt;&gt;();</span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>markoKnowsVadas</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>markoKnowsJosh</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>markoCreateLop</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>joshCreateRipple</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>joshCreateLop</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>add</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>peterCreateLop</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertices</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>vertices</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>forEach</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>vertex</span> <span style=color:#ce5c00;font-weight:700>-&gt;</span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>));</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdges</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>edges</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>forEach</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>edge</span> <span style=color:#ce5c00;font-weight:700>-&gt;</span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>edge</span><span style=color:#ce5c00;font-weight:700>));</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>close</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=44-run-the-example>4.4 Run The Example</h3><p>Before running Example, you need to start the Server. For the startup process, see<a href=/docs/quickstart/hugegraph-server>HugeGraph-Server Quick Start</a>.</p><h3 id=45-more-information-about-client-api>4.5 More Information About Client-API</h3><p>See<a href=/docs/clients/hugegraph-client>Introduce basic API of HugeGraph-Client</a>.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-405910066a042ce44a1c5798042ab119>3.5 - HugeGraph-AI Quick Start</h1><h3 id=1-hugegraph-ai-overview>1 HugeGraph-AI Overview</h3><p>hugegraph-ai aims to explore the integration of HugeGraph and artificial intelligence (AI), including applications combined
with large models, integration with graph machine learning components, etc., to provide comprehensive support for developers to use HugeGraph&rsquo;s AI capabilities in projects.</p><h3 id=2-environment-requirements>2 Environment Requirements</h3><ul><li>python 3.8+</li><li>hugegraph 1.0.0+</li></ul><h3 id=3-preparation>3 Preparation</h3><ul><li>Start the HugeGraph database, you can achieve this through Docker. Please refer to this <a href=https://hub.docker.com/r/hugegraph/hugegraph>link</a> for guidance.</li><li>Start the gradio interactive demo, you can start with the following command, and open <a href=http://127.0.0.1:8001>http://127.0.0.1:8001</a> after starting</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># ${PROJECT_ROOT_DIR} is the root directory of hugegraph-ai, which needs to be configured by yourself</span>
</span></span><span style=display:flex><span><span style=color:#204a87>export</span> <span style=color:#000>PYTHONPATH</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>${</span><span style=color:#000>PROJECT_ROOT_DIR</span><span style=color:#4e9a06>}</span>/hugegraph-llm/src:<span style=color:#4e9a06>${</span><span style=color:#000>PROJECT_ROOT_DIR</span><span style=color:#4e9a06>}</span>/hugegraph-python-client/src
</span></span><span style=display:flex><span>python3 ./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py
</span></span></code></pre></div><ul><li>Configure HugeGraph database connection information and LLM information, which can be configured in two ways:<ol><li>Configure the <code>./hugegraph-llm/src/config/config.ini</code> file</li><li>In gradio, after completing the configurations for LLM and HugeGraph, click on <code>Initialize configs</code>, the complete and initialized configuration file will be outputted.
<img src=/docs/images/gradio-config.png alt=gradio-config></li></ol></li><li>offline download NLTK stopwords</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>python3 ./hugegraph_llm/operators/common_op/nltk_helper.py
</span></span></code></pre></div><h3 id=4-how-to-use>4 How to use</h3><h4 id=41-build-a-knowledge-graph-in-hugegraph-through-llm>4.1 Build a knowledge graph in HugeGraph through LLM</h4><h5 id=411-build-a-knowledge-graph-through-the-gradio-interactive-interface>4.1.1 Build a knowledge graph through the gradio interactive interface</h5><ul><li>Parameter description:<ul><li>Text: The input text.</li><li>Schema: Accepts the following two types of text:<ul><li>User-defined JSON format schema.</li><li>Specify the name of the HugeGraph graph instance, which will automatically extract the schema of the graph.</li></ul></li><li>Disambiguate word sense: Whether to disambiguate word sense.</li><li>Commit to hugegraph: Whether to submit the constructed knowledge graph to the HugeGraph server</li></ul></li></ul><p><img src=/docs/images/gradio-kg.png alt=gradio-config></p><h5 id=412-build-a-knowledge-graph-through-code>4.1.2 Build a knowledge graph through code</h5><ul><li>Complete code</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#204a87;font-weight:700>from</span> <span style=color:#000>hugegraph_llm.llms.init_llm</span> <span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>LLMs</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>from</span> <span style=color:#000>hugegraph_llm.operators.kg_construction_task</span> <span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>KgBuilder</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>llm</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>LLMs</span><span style=color:#000;font-weight:700>()</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>get_llm</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>builder</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>KgBuilder</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>llm</span><span style=color:#000;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>(</span>
</span></span><span style=display:flex><span> <span style=color:#000>builder</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>import_schema</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>from_hugegraph</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;test_graph&#34;</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>extract_triples</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>TEXT</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>disambiguate_word_sense</span><span style=color:#000;font-weight:700>()</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>commit_to_hugegraph</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>run</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>)</span>
</span></span></code></pre></div><ul><li>Sequence Diagram
<img src=/docs/images/kg-uml.png alt=gradio-config></li></ul><ol><li>Initialize: Initialize the LLMs instance, get the LLM, and then create a task instance <code>KgBuilder</code> for graph construction. <code>KgBuilder</code> defines multiple operators, and users can freely combine them according to their needs. (tip: <code>print_result()</code> can print the result of each step in the console, without affecting the overall execution logic)</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>llm</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>LLMs</span><span style=color:#000;font-weight:700>()</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>get_llm</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>builder</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>KgBuilder</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>llm</span><span style=color:#000;font-weight:700>)</span>
</span></span></code></pre></div><ol start=2><li>Import Schema: Import using the <code>import_schema</code> method, which supports three modes:<ul><li>Import from a HugeGraph instance, specify the name of the HugeGraph graph instance, and it will automatically extract the schema of the graph.</li><li>Import from a user-defined schema, accept user-defined JSON format schema.</li><li>Import from the extraction result (release soon)</li></ul></li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Import schema from a HugeGraph instance</span>
</span></span><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>import_schema</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>from_hugegraph</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;test_graph&#34;</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Import schema from user-defined schema</span>
</span></span><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>import_schema</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>from_user_defined</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;xxx&#34;</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Import schema from an extraction result</span>
</span></span><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>import_schema</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>from_extraction</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;xxx&#34;</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><ol start=3><li>Extract triples: Use the <code>extract_triples</code> method to extract triples from the text.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>TEXT</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#4e9a06>&#34;Meet Sarah, a 30-year-old attorney, and her roommate, James, whom she&#39;s shared a home with since 2010.&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>extract_triples</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>TEXT</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><ol start=4><li>Disambiguate word sense: Use the <code>disambiguate_word_sense</code> method to disambiguate word sense.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>disambiguate_word_sense</span><span style=color:#000;font-weight:700>()</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><ol start=5><li>Commit to HugeGraph: Use the <code>commit_to_hugegraph</code> method to submit the constructed knowledge graph to the HugeGraph instance.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>commit_to_hugegraph</span><span style=color:#000;font-weight:700>()</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><ol start=6><li>Run: Use the <code>run</code> method to execute the above operations.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>run</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><h4 id=42-retrieval-augmented-generation-rag-based-on-hugegraph>4.2 Retrieval augmented generation (RAG) based on HugeGraph</h4><h5 id=411-interactive-qa-through-gradio>4.1.1 Interactive Q&A through gradio</h5><ol><li>First click the <code>Initialize HugeGraph test data</code> button to initialize the HugeGraph data.
<img src=/docs/images/gradio-rag-1.png alt=gradio-config></li><li>Then click the <code>Retrieval augmented generation</code> button to generate the answer to the question.
<img src=/docs/images/gradio-rag-2.png alt=gradio-config></li></ol><h5 id=412-build-graph-rag-through-code>4.1.2 Build Graph RAG through code</h5><ul><li>code</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>graph_rag</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>GraphRAG</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>result</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000;font-weight:700>(</span>
</span></span><span style=display:flex><span> <span style=color:#000>graph_rag</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>extract_keyword</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>text</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;Tell me about Al Pacino.&#34;</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>query_graph_for_rag</span><span style=color:#000;font-weight:700>(</span>
</span></span><span style=display:flex><span> <span style=color:#000>max_deep</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#000>max_items</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#0000cf;font-weight:700>30</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>synthesize_answer</span><span style=color:#000;font-weight:700>()</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>run</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>verbose</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#204a87;font-weight:700>True</span><span style=color:#000;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>)</span>
</span></span></code></pre></div><ol><li>extract_keyword: Extract keywords and expand synonyms.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>graph_rag</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>extract_keyword</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>text</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;Tell me about Al Pacino.&#34;</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><ol start=2><li>query_graph_for_rag: Retrieve the corresponding keywords and their multi-degree associated relationships from HugeGraph.<ul><li>max_deep: The maximum depth of hugegraph retrieval.</li><li>max_items: The maximum number of results returned by hugegraph.</li></ul></li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>graph_rag</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>query_graph_for_rag</span><span style=color:#000;font-weight:700>(</span>
</span></span><span style=display:flex><span> <span style=color:#000>max_deep</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#000>max_items</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#0000cf;font-weight:700>30</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><ol start=3><li>synthesize_answer: Summarize the results and organize the language to answer the question.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>graph_rag</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>synthesize_answer</span><span style=color:#000;font-weight:700>()</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>print_result</span><span style=color:#000;font-weight:700>()</span>
</span></span></code></pre></div><ol start=4><li>run: Execute the above operations.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#000>graph_rag</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>run</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>verbose</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#204a87;font-weight:700>True</span><span style=color:#000;font-weight:700>)</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-06d4cae527789fcda01ebf4e48c6559f>3.6 - HugeGraph-Tools Quick Start</h1><h3 id=1-hugegraph-tools-overview>1 HugeGraph-Tools Overview</h3><p>HugeGraph-Tools is an automated deployment, management and backup/restore component of HugeGraph.</p><h3 id=2-get-hugegraph-tools>2 Get HugeGraph-Tools</h3><p>There are two ways to get HugeGraph-Tools:</p><ul><li>Download the compiled tarball</li><li>Clone source code then compile and install</li></ul><h4 id=21-download-the-compiled-archive>2.1 Download the compiled archive</h4><p>Download the latest version of the HugeGraph-Toolchain package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0.tar.gz
</span></span><span style=display:flex><span>tar zxf *hugegraph*.tar.gz
</span></span></code></pre></div><h4 id=22-clone-source-code-to-compile-and-install>2.2 Clone source code to compile and install</h4><p>Please ensure that the wget command is installed before compiling the source code</p><p>Download the latest version of the HugeGraph-Tools source package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 1. get from github</span>
</span></span><span style=display:flex><span>git clone https://github.com/apache/hugegraph-toolchain.git
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 2. get from direct (e.g. here is 1.0.0, please choose the latest version)</span>
</span></span><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0-src.tar.gz
</span></span></code></pre></div><p>Compile and generate tar package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> hugegraph-tools
</span></span><span style=display:flex><span>mvn package -DskipTests
</span></span></code></pre></div><p>Generate tar package hugegraph-tools-${version}.tar.gz</p><h3 id=3-how-to-use>3 How to use</h3><h4 id=31-function-overview>3.1 Function overview</h4><p>After decompression, enter the hugegraph-tools directory, you can use <code>bin/hugegraph</code> or <code>bin/hugegraph help</code> to view the usage information. mainly divided:</p><ul><li>Graph management Type,graph-mode-set、graph-mode-get、graph-list、graph-get and graph-clear</li><li>Asynchronous task management Type,task-list、task-get、task-delete、task-cancel and task-clear</li><li>Gremlin Type,gremlin-execute and gremlin-schedule</li><li>Backup/Restore Type,backup、restore、migrate、schedule-backup and dump</li><li>Install the deployment Type,deploy、clear、start-all and stop-all</li></ul><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>Usage: hugegraph <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>command<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#204a87>command</span> options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span></code></pre></div><h5 id=32-options-global-variable>3.2 [options]-Global Variable</h5><p><code>options</code> is a global variable of HugeGraph-Tools, which can be configured in hugegraph-tools/bin/hugegraph, including:</p><ul><li>&ndash;graph,HugeGraph-Tools The name of the graph to operate on, the default value is hugegraph</li><li>&ndash;url,The service address of HugeGraph-Server, the default is http://127.0.0.1:8080</li><li>&ndash;user,When HugeGraph-Server opens authentication, pass username</li><li>&ndash;password,When HugeGraph-Server opens authentication, pass the user&rsquo;s password</li><li>&ndash;timeout,Timeout when connecting to HugeGraph-Server, the default is 30s</li><li>&ndash;trust-store-file,The path of the certificate file, when &ndash;url uses https, the truststore file used by HugeGraph-Client, the default is empty, which means using the built-in truststore file conf/hugegraph.truststore of hugegraph-tools</li><li>&ndash;trust-store-password,The password of the certificate file, when &ndash;url uses https, the password of the truststore used by HugeGraph-Client, the default is empty, representing the password of the built-in truststore file of hugegraph-tools</li></ul><p>The above global variables can also be set through environment variables. One way is to use export on the command line to set temporary environment variables, which are valid until the command line is closed</p><table><thead><tr><th>Global Variable</th><th>Environment Variable</th><th>Example</th></tr></thead><tbody><tr><td>&ndash;url</td><td>HUGEGRAPH_URL</td><td>export HUGEGRAPH_URL=http://127.0.0.1:8080</td></tr><tr><td>&ndash;graph</td><td>HUGEGRAPH_GRAPH</td><td>export HUGEGRAPH_GRAPH=hugegraph</td></tr><tr><td>&ndash;user</td><td>HUGEGRAPH_USERNAME</td><td>export HUGEGRAPH_USERNAME=admin</td></tr><tr><td>&ndash;password</td><td>HUGEGRAPH_PASSWORD</td><td>export HUGEGRAPH_PASSWORD=test</td></tr><tr><td>&ndash;timeout</td><td>HUGEGRAPH_TIMEOUT</td><td>export HUGEGRAPH_TIMEOUT=30</td></tr><tr><td>&ndash;trust-store-file</td><td>HUGEGRAPH_TRUST_STORE_FILE</td><td>export HUGEGRAPH_TRUST_STORE_FILE=/tmp/trust-store</td></tr><tr><td>&ndash;trust-store-password</td><td>HUGEGRAPH_TRUST_STORE_PASSWORD</td><td>export HUGEGRAPH_TRUST_STORE_PASSWORD=xxxx</td></tr></tbody></table><p>Another way is to set the environment variable in the bin/hugegraph script:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#!/bin/bash
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Set environment here if needed</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#export HUGEGRAPH_URL=</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#export HUGEGRAPH_GRAPH=</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#export HUGEGRAPH_USERNAME=</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#export HUGEGRAPH_PASSWORD=</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#export HUGEGRAPH_TIMEOUT=</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#export HUGEGRAPH_TRUST_STORE_FILE=</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#export HUGEGRAPH_TRUST_STORE_PASSWORD=</span>
</span></span></code></pre></div><h5 id=33-graph-management-typegraph-mode-setgraph-mode-getgraph-listgraph-get-and-graph-clear>3.3 Graph Management Type,graph-mode-set、graph-mode-get、graph-list、graph-get and graph-clear</h5><ul><li>graph-mode-set,set graph restore mode<ul><li>&ndash;graph-mode or -m, required, specifies the mode to be set, legal values include [NONE, RESTORING, MERGING, LOADING]</li></ul></li><li>graph-mode-get,get graph restore mode</li><li>graph-list,list all graphs in a HugeGraph-Server</li><li>graph-get,get a graph and its storage backend type</li><li>graph-clear,clear all schema and data of a graph<ul><li>&ndash;confirm-message Or -c, required, delete confirmation information, manual input is required, double confirmation to prevent accidental deletion, &ldquo;I&rsquo;m sure to delete all data&rdquo;, including double quotes</li></ul></li></ul><blockquote><p>When you need to restore the backup graph to a new graph, you need to set the graph mode to RESTORING mode; when you need to merge the backup graph into an existing graph, you need to first set the graph mode to MERGING model.</p></blockquote><h5 id=34-asynchronous-task-management-typetask-listtask-get-and-task-delete>3.4 Asynchronous task management Type,task-list、task-get and task-delete</h5><ul><li>task-list,List the asynchronous tasks in a graph, which can be filtered according to the status of the tasks<ul><li>&ndash;status,Optional, specify the status of the task to view, i.e. filter tasks by status</li><li>&ndash;limit,Optional, specify the number of tasks to be obtained, the default is -1, which means to obtain all eligible tasks</li></ul></li><li>task-get,Get detailed information about an asynchronous task<ul><li>&ndash;task-id,Required, specifies the ID of the asynchronous task</li></ul></li><li>task-delete,Delete information about an asynchronous task<ul><li>&ndash;task-id,Required, specifies the ID of the asynchronous task</li></ul></li><li>task-cancel,Cancel the execution of an asynchronous task<ul><li>&ndash;task-id,ID of the asynchronous task to cancel</li></ul></li><li>task-clear,Clean up completed asynchronous tasks<ul><li>&ndash;force,Optional. When set, it means to clean up all asynchronous tasks. Unfinished ones are canceled first, and then all asynchronous tasks are cleared. By default, only completed asynchronous tasks are cleaned up</li></ul></li></ul><h5 id=35-gremlin-typegremlin-execute-and-gremlin-schedule>3.5 Gremlin Type,gremlin-execute and gremlin-schedule</h5><ul><li>gremlin-execute, send Gremlin statements to HugeGraph-Server to execute query or modification operations, execute synchronously, and return results after completion<ul><li>&ndash;file or -f, specify the script file to execute, UTF-8 encoding, mutually exclusive with &ndash;script</li><li>&ndash;script or -s, specifies the script string to execute, mutually exclusive with &ndash;file</li><li>&ndash;aliases or -a, Gremlin alias settings, the format is: key1=value1,key2=value2,&mldr;</li><li>&ndash;bindings or -b, Gremlin binding settings, the format is: key1=value1,key2=value2,&mldr;</li><li>&ndash;language or -l, the language of the Gremlin script, the default is gremlin-groovy</li></ul><blockquote><p>&ndash;file and &ndash;script are mutually exclusive, one of them must be set</p></blockquote></li><li>gremlin-schedule, send Gremlin statements to HugeGraph-Server to perform query or modification operations, asynchronous execution, and return the asynchronous task id immediately after the task is submitted<ul><li>&ndash;file or -f, specify the script file to execute, UTF-8 encoding, mutually exclusive with &ndash;script</li><li>&ndash;script or -s, specifies the script string to execute, mutually exclusive with &ndash;file</li><li>&ndash;bindings or -b, Gremlin binding settings, the format is: key1=value1,key2=value2,&mldr;</li><li>&ndash;language or -l, the language of the Gremlin script, the default is gremlin-groovy</li></ul><blockquote><p>&ndash;file and &ndash;script are mutually exclusive, one of them must be set</p></blockquote></li></ul><h5 id=36-backuprestore-type>3.6 Backup/Restore Type</h5><ul><li>backup, back up the schema or data in a certain graph out of the HugeGraph system, and store it on the local disk or HDFS in the form of JSON<ul><li>&ndash;format, the backup format, optional values include [json, text], the default is json</li><li>&ndash;all-properties, whether to back up all properties of vertices/edges, only valid when &ndash;format is text, default false</li><li>&ndash;label, the type of vertices/edges to be backed up, only valid when &ndash;format is text, only valid when backing up vertices or edges</li><li>&ndash;properties, properties of vertices/edges to be backed up, separated by commas, only valid when &ndash;format is text, valid only when backing up vertices or edges</li><li>&ndash;compress, whether to compress data during backup, the default is true</li><li>&ndash;directory or -d, the directory to store schema or data, the default is &lsquo;./{graphName}&rsquo; for local directory, and &lsquo;{fs.default.name}/{graphName}&rsquo; for HDFS</li><li>&ndash;huge-types or -t, the data types to be backed up, separated by commas, the optional value is &lsquo;all&rsquo; or a combination of one or more [vertex, edge, vertex_label, edge_label, property_key, index_label], &lsquo;all&rsquo; Represents all 6 types, namely vertices, edges and all schemas</li><li>&ndash;log or -l, specify the log directory, the default is the current directory</li><li>&ndash;retry, specify the number of failed retries, the default is 3</li><li>&ndash;split-size or -s, specifies the size of splitting vertices or edges when backing up, the default is 1048576</li><li>-D, use the mode of -Dkey=value to specify dynamic parameters, and specify HDFS configuration items when backing up data to HDFS, for example: -Dfs.default.name=hdfs://localhost:9000</li></ul></li><li>restore, restore schema or data stored in JSON format to a new graph (RESTORING mode) or merge into an existing graph (MERGING mode)<ul><li>&ndash;directory or -d, the directory to store schema or data, the default is &lsquo;./{graphName}&rsquo; for local directory, and &lsquo;{fs.default.name}/{graphName}&rsquo; for HDFS</li><li>&ndash;clean, whether to delete the directory specified by &ndash;directory after the recovery map is completed, the default is false</li><li>&ndash;huge-types or -t, data types to restore, separated by commas, optional value is &lsquo;all&rsquo; or a combination of one or more [vertex, edge, vertex_label, edge_label, property_key, index_label], &lsquo;all&rsquo; Represents all 6 types, namely vertices, edges and all schemas</li><li>&ndash;log or -l, specify the log directory, the default is the current directory</li><li>&ndash;retry, specify the number of failed retries, the default is 3</li><li>-D, use the mode of -Dkey=value to specify dynamic parameters, which are used to specify HDFS configuration items when restoring graphs from HDFS, for example: -Dfs.default.name=hdfs://localhost:9000</li></ul><blockquote><p>restore command can be used only if &ndash;format is executed as backup for json</p></blockquote></li><li>migrate, migrate the currently connected graph to another HugeGraphServer<ul><li>&ndash;target-graph, the name of the target graph, the default is hugegraph</li><li>&ndash;target-url, the HugeGraphServer where the target graph is located, the default is http://127.0.0.1:8081</li><li>&ndash;target-username, the username to access the target map</li><li>&ndash;target-password, the password to access the target map</li><li>&ndash;target-timeout, the timeout for accessing the target map</li><li>&ndash;target-trust-store-file, access the truststore file used by the target graph</li><li>&ndash;target-trust-store-password, the password to access the truststore used by the target map</li><li>&ndash;directory or -d, during the migration process, the directory where the schema or data of the source graph is stored. For a local directory, the default is &lsquo;./{graphName}&rsquo;; for HDFS, the default is &lsquo;{fs.default.name}/ {graphName}&rsquo;</li><li>&ndash;huge-types or -t, the data types to be migrated, separated by commas, the optional value is &lsquo;all&rsquo; or a combination of one or more [vertex, edge, vertex_label, edge_label, property_key, index_label], &lsquo;all&rsquo; Represents all 6 types, namely vertices, edges and all schemas</li><li>&ndash;log or -l, specify the log directory, the default is the current directory</li><li>&ndash;retry, specify the number of failed retries, the default is 3</li><li>&ndash;split-size or -s, specify the size of the vertex or edge block when backing up the source graph during the migration process, the default is 1048576</li><li>-D, use the mode of -Dkey=value to specify dynamic parameters, which are used to specify HDFS configuration items when the data needs to be backed up to HDFS during the migration process, for example: -Dfs.default.name=hdfs://localhost: 9000</li><li>&ndash;graph-mode or -m, the mode to set the target graph when restoring the source graph to the target graph, legal values include [RESTORING, MERGING]</li><li>&ndash;keep-local-data, whether to keep the backup of the source map generated in the process of migrating the map, the default is false, that is, the backup of the source map is not kept after the default migration map ends</li></ul></li><li>schedule-backup, periodically back up the graph and keep a certain number of the latest backups (currently only supports local file systems)<ul><li>&ndash;directory or -d, required, specifies the directory of the backup data</li><li>&ndash;backup-num, optional, specifies the number of latest backups to save, defaults to 3</li><li>&ndash;interval, an optional item, specifies the backup cycle, the format is the same as the Linux crontab format</li></ul></li><li>dump, export all the vertices and edges of the entire graph, and store them in <code>vertex vertex-edge1 vertex-edge2...</code>JSON format by default.
Users can also customize the storage format, just need to be in <code>hugegraph-tools/src/main/java/com/baidu/hugegraph/formatter</code>
Implement a class inherited from <code>Formatter</code> in the directory, such as <code>CustomFormatter</code>, and specify this class as formatter when using it, for example
<code>bin/hugegraph dump -f CustomFormatter</code><ul><li>&ndash;formatter or -f, specify the formatter to use, the default is JsonFormatter</li><li>&ndash;directory or -d, the directory where schema or data is stored, the default is the current directory</li><li>&ndash;log or -l, specify the log directory, the default is the current directory</li><li>&ndash;retry, specify the number of failed retries, the default is 3</li><li>&ndash;split-size or -s, specifies the size of splitting vertices or edges when backing up, the default is 1048576</li><li>-D, use the mode of -Dkey=value to specify dynamic parameters, and specify HDFS configuration items when backing up data to HDFS, for example: -Dfs.default.name=hdfs://localhost:9000</li></ul></li></ul><h5 id=37-install-the-deployment-type>3.7 Install the deployment type</h5><ul><li>deploy, one-click download, install and start HugeGraph-Server and HugeGraph-Studio<ul><li>-v, required, specifies the version number of HugeGraph-Server and HugeGraph-Studio installed, the latest is 0.9</li><li>-p, required, specifies the installed HugeGraph-Server and HugeGraph-Studio directories</li><li>-u, optional, specifies the link to download the HugeGraph-Server and HugeGraph-Studio compressed packages</li></ul></li><li>clear, clean up HugeGraph-Server and HugeGraph-Studio directories and tarballs<ul><li>-p, required, specifies the directory of HugeGraph-Server and HugeGraph-Studio to be cleaned</li></ul></li><li>start-all, start HugeGraph-Server and HugeGraph-Studio with one click, and start monitoring, automatically pull up the service when the service dies<ul><li>-v, required, specifies the version number of HugeGraph-Server and HugeGraph-Studio to be started, the latest is 0.9</li><li>-p, required, specifies the directory where HugeGraph-Server and HugeGraph-Studio are installed</li></ul></li><li>stop-all, close HugeGraph-Server and HugeGraph-Studio with one click</li></ul><blockquote><p>There is an optional parameter -u in the deploy command. When provided, the specified download address will be used instead of the default download address to download the tar package, and the address will be written into the <code>~/hugegraph-download-url-prefix</code> file; if no address is specified later When -u and <code>~/hugegraph-download-url-prefix</code> are not specified, the tar package will be downloaded from the address specified by <code>~/hugegraph-download-url-prefix</code>; if there is neither -u nor <code>~/hugegraph-download-url-prefix</code>, it will be downloaded from the default download address</p></blockquote><h5 id=38-specific-command-parameters>3.8 Specific command parameters</h5><p>The specific parameters of each subcommand are as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>Usage: hugegraph <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>command<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#204a87>command</span> options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --graph
</span></span><span style=display:flex><span> Name of graph
</span></span><span style=display:flex><span> Default: hugegraph
</span></span><span style=display:flex><span> --password
</span></span><span style=display:flex><span> Password of user
</span></span><span style=display:flex><span> --timeout
</span></span><span style=display:flex><span> Connection timeout
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>30</span>
</span></span><span style=display:flex><span> --trust-store-file
</span></span><span style=display:flex><span> The path of client truststore file used when https protocol is enabled
</span></span><span style=display:flex><span> --trust-store-password
</span></span><span style=display:flex><span> The password of the client truststore file used when the https protocol
</span></span><span style=display:flex><span> is enabled
</span></span><span style=display:flex><span> --url
</span></span><span style=display:flex><span> The URL of HugeGraph-Server
</span></span><span style=display:flex><span> Default: http://127.0.0.1:8080
</span></span><span style=display:flex><span> --user
</span></span><span style=display:flex><span> Name of user
</span></span><span style=display:flex><span> Commands:
</span></span><span style=display:flex><span> graph-list List all graphs
</span></span><span style=display:flex><span> Usage: graph-list
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> graph-get Get graph info
</span></span><span style=display:flex><span> Usage: graph-get
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> graph-clear Clear graph schema and data
</span></span><span style=display:flex><span> Usage: graph-clear <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * --confirm-message, -c
</span></span><span style=display:flex><span> Confirm message of graph clear is <span style=color:#4e9a06>&#34;I&#39;m sure to delete all data&#34;</span>.
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>(</span>Note: include <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> graph-mode-set Set graph mode
</span></span><span style=display:flex><span> Usage: graph-mode-set <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * --graph-mode, -m
</span></span><span style=display:flex><span> Graph mode, include: <span style=color:#ce5c00;font-weight:700>[</span>NONE, RESTORING, MERGING<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Possible Values: <span style=color:#ce5c00;font-weight:700>[</span>NONE, RESTORING, MERGING, LOADING<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> graph-mode-get Get graph mode
</span></span><span style=display:flex><span> Usage: graph-mode-get
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> task-list List tasks
</span></span><span style=display:flex><span> Usage: task-list <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --limit
</span></span><span style=display:flex><span> Limit number, no limit <span style=color:#204a87;font-weight:700>if</span> not provided
</span></span><span style=display:flex><span> Default: -1
</span></span><span style=display:flex><span> --status
</span></span><span style=display:flex><span> Status of task
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> task-get Get task info
</span></span><span style=display:flex><span> Usage: task-get <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * --task-id
</span></span><span style=display:flex><span> Task id
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> task-delete Delete task
</span></span><span style=display:flex><span> Usage: task-delete <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * --task-id
</span></span><span style=display:flex><span> Task id
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> task-cancel Cancel task
</span></span><span style=display:flex><span> Usage: task-cancel <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * --task-id
</span></span><span style=display:flex><span> Task id
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> task-clear Clear completed tasks
</span></span><span style=display:flex><span> Usage: task-clear <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --force
</span></span><span style=display:flex><span> Force to clear all tasks, cancel all uncompleted tasks firstly,
</span></span><span style=display:flex><span> and delete all completed tasks
</span></span><span style=display:flex><span> Default: <span style=color:#204a87>false</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> gremlin-execute Execute Gremlin statements
</span></span><span style=display:flex><span> Usage: gremlin-execute <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --aliases, -a
</span></span><span style=display:flex><span> Gremlin aliases, valid format is: <span style=color:#4e9a06>&#39;key1=value1,key2=value2...&#39;</span>
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>{}</span>
</span></span><span style=display:flex><span> --bindings, -b
</span></span><span style=display:flex><span> Gremlin bindings, valid format is: <span style=color:#4e9a06>&#39;key1=value1,key2=value2...&#39;</span>
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>{}</span>
</span></span><span style=display:flex><span> --file, -f
</span></span><span style=display:flex><span> Gremlin Script file to be executed, UTF-8 encoded, exclusive to
</span></span><span style=display:flex><span> --script
</span></span><span style=display:flex><span> --language, -l
</span></span><span style=display:flex><span> Gremlin script language
</span></span><span style=display:flex><span> Default: gremlin-groovy
</span></span><span style=display:flex><span> --script, -s
</span></span><span style=display:flex><span> Gremlin script to be executed, exclusive to --file
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> gremlin-schedule Execute Gremlin statements as asynchronous job
</span></span><span style=display:flex><span> Usage: gremlin-schedule <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --bindings, -b
</span></span><span style=display:flex><span> Gremlin bindings, valid format is: <span style=color:#4e9a06>&#39;key1=value1,key2=value2...&#39;</span>
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>{}</span>
</span></span><span style=display:flex><span> --file, -f
</span></span><span style=display:flex><span> Gremlin Script file to be executed, UTF-8 encoded, exclusive to
</span></span><span style=display:flex><span> --script
</span></span><span style=display:flex><span> --language, -l
</span></span><span style=display:flex><span> Gremlin script language
</span></span><span style=display:flex><span> Default: gremlin-groovy
</span></span><span style=display:flex><span> --script, -s
</span></span><span style=display:flex><span> Gremlin script to be executed, exclusive to --file
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> backup Backup graph schema/data. If directory is on HDFS, use -D to
</span></span><span style=display:flex><span> <span style=color:#204a87>set</span> HDFS params. For exmaple:
</span></span><span style=display:flex><span> -Dfs.default.name<span style=color:#ce5c00;font-weight:700>=</span>hdfs://localhost:9000
</span></span><span style=display:flex><span> Usage: backup <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --all-properties
</span></span><span style=display:flex><span> All properties to be backup flag
</span></span><span style=display:flex><span> Default: <span style=color:#204a87>false</span>
</span></span><span style=display:flex><span> --compress
</span></span><span style=display:flex><span> compress flag
</span></span><span style=display:flex><span> Default: <span style=color:#204a87>true</span>
</span></span><span style=display:flex><span> --directory, -d
</span></span><span style=display:flex><span> Directory of graph schema/data, default is <span style=color:#4e9a06>&#39;./{graphname}&#39;</span> in
</span></span><span style=display:flex><span> <span style=color:#204a87>local</span> file system or <span style=color:#4e9a06>&#39;{fs.default.name}/{graphname}&#39;</span> in HDFS
</span></span><span style=display:flex><span> --format
</span></span><span style=display:flex><span> File format, valid is <span style=color:#ce5c00;font-weight:700>[</span>json, text<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Default: json
</span></span><span style=display:flex><span> --huge-types, -t
</span></span><span style=display:flex><span> Type of schema/data. Concat with <span style=color:#4e9a06>&#39;,&#39;</span> <span style=color:#204a87;font-weight:700>if</span> more than one. <span style=color:#4e9a06>&#39;all&#39;</span> means
</span></span><span style=display:flex><span> all vertices, edges and schema, in other words, <span style=color:#4e9a06>&#39;all&#39;</span> equals with
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#39;vertex,edge,vertex_label,edge_label,property_key,index_label&#39;</span>
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>[</span>PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> --label
</span></span><span style=display:flex><span> Vertex or edge label, only valid when <span style=color:#204a87>type</span> is vertex or edge
</span></span><span style=display:flex><span> --log, -l
</span></span><span style=display:flex><span> Directory of log
</span></span><span style=display:flex><span> Default: ./logs
</span></span><span style=display:flex><span> --properties
</span></span><span style=display:flex><span> Vertex or edge properties to backup, only valid when <span style=color:#204a87>type</span> is
</span></span><span style=display:flex><span> vertex or edge
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>[]</span>
</span></span><span style=display:flex><span> --retry
</span></span><span style=display:flex><span> Retry times, default is <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> --split-size, -s
</span></span><span style=display:flex><span> Split size of shard
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>1048576</span>
</span></span><span style=display:flex><span> -D
</span></span><span style=display:flex><span> HDFS config parameters
</span></span><span style=display:flex><span> Syntax: -Dkey<span style=color:#ce5c00;font-weight:700>=</span>value
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>{}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> schedule-backup Schedule backup task
</span></span><span style=display:flex><span> Usage: schedule-backup <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --backup-num
</span></span><span style=display:flex><span> The number of latest backups to keep
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> * --directory, -d
</span></span><span style=display:flex><span> The directory of backups stored
</span></span><span style=display:flex><span> --interval
</span></span><span style=display:flex><span> The interval of backup, format is: <span style=color:#4e9a06>&#34;a b c d e&#34;</span>. <span style=color:#4e9a06>&#39;a&#39;</span> means minute
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>0</span> - 59<span style=color:#ce5c00;font-weight:700>)</span>, <span style=color:#4e9a06>&#39;b&#39;</span> means hour <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>0</span> - 23<span style=color:#ce5c00;font-weight:700>)</span>, <span style=color:#4e9a06>&#39;c&#39;</span> means day of month <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>1</span> -
</span></span><span style=display:flex><span> 31<span style=color:#ce5c00;font-weight:700>)</span>, <span style=color:#4e9a06>&#39;d&#39;</span> means month <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>1</span> - 12<span style=color:#ce5c00;font-weight:700>)</span>, <span style=color:#4e9a06>&#39;e&#39;</span> means day of week <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>0</span> - 6<span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>Sunday</span><span style=color:#ce5c00;font-weight:700>=</span>0<span style=color:#ce5c00;font-weight:700>)</span>, <span style=color:#4e9a06>&#34;*&#34;</span> means all
</span></span><span style=display:flex><span> Default: <span style=color:#4e9a06>&#34;0 0 * * *&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> dump Dump graph to files
</span></span><span style=display:flex><span> Usage: dump <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --directory, -d
</span></span><span style=display:flex><span> Directory of graph schema/data, default is <span style=color:#4e9a06>&#39;./{graphname}&#39;</span> in
</span></span><span style=display:flex><span> <span style=color:#204a87>local</span> file system or <span style=color:#4e9a06>&#39;{fs.default.name}/{graphname}&#39;</span> in HDFS
</span></span><span style=display:flex><span> --formatter, -f
</span></span><span style=display:flex><span> Formatter to customize format of vertex/edge
</span></span><span style=display:flex><span> Default: JsonFormatter
</span></span><span style=display:flex><span> --log, -l
</span></span><span style=display:flex><span> Directory of log
</span></span><span style=display:flex><span> Default: ./logs
</span></span><span style=display:flex><span> --retry
</span></span><span style=display:flex><span> Retry times, default is <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> --split-size, -s
</span></span><span style=display:flex><span> Split size of shard
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>1048576</span>
</span></span><span style=display:flex><span> -D
</span></span><span style=display:flex><span> HDFS config parameters
</span></span><span style=display:flex><span> Syntax: -Dkey<span style=color:#ce5c00;font-weight:700>=</span>value
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>{}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> restore Restore graph schema/data. If directory is on HDFS, use -D to
</span></span><span style=display:flex><span> <span style=color:#204a87>set</span> HDFS params <span style=color:#204a87;font-weight:700>if</span> needed. For
</span></span><span style=display:flex><span> exmaple:-Dfs.default.name<span style=color:#ce5c00;font-weight:700>=</span>hdfs://localhost:9000
</span></span><span style=display:flex><span> Usage: restore <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --clean
</span></span><span style=display:flex><span> Whether to remove the directory of graph data after restored
</span></span><span style=display:flex><span> Default: <span style=color:#204a87>false</span>
</span></span><span style=display:flex><span> --directory, -d
</span></span><span style=display:flex><span> Directory of graph schema/data, default is <span style=color:#4e9a06>&#39;./{graphname}&#39;</span> in
</span></span><span style=display:flex><span> <span style=color:#204a87>local</span> file system or <span style=color:#4e9a06>&#39;{fs.default.name}/{graphname}&#39;</span> in HDFS
</span></span><span style=display:flex><span> --huge-types, -t
</span></span><span style=display:flex><span> Type of schema/data. Concat with <span style=color:#4e9a06>&#39;,&#39;</span> <span style=color:#204a87;font-weight:700>if</span> more than one. <span style=color:#4e9a06>&#39;all&#39;</span> means
</span></span><span style=display:flex><span> all vertices, edges and schema, in other words, <span style=color:#4e9a06>&#39;all&#39;</span> equals with
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#39;vertex,edge,vertex_label,edge_label,property_key,index_label&#39;</span>
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>[</span>PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> --log, -l
</span></span><span style=display:flex><span> Directory of log
</span></span><span style=display:flex><span> Default: ./logs
</span></span><span style=display:flex><span> --retry
</span></span><span style=display:flex><span> Retry times, default is <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> -D
</span></span><span style=display:flex><span> HDFS config parameters
</span></span><span style=display:flex><span> Syntax: -Dkey<span style=color:#ce5c00;font-weight:700>=</span>value
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>{}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> migrate Migrate graph
</span></span><span style=display:flex><span> Usage: migrate <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> --directory, -d
</span></span><span style=display:flex><span> Directory of graph schema/data, default is <span style=color:#4e9a06>&#39;./{graphname}&#39;</span> in
</span></span><span style=display:flex><span> <span style=color:#204a87>local</span> file system or <span style=color:#4e9a06>&#39;{fs.default.name}/{graphname}&#39;</span> in HDFS
</span></span><span style=display:flex><span> --graph-mode, -m
</span></span><span style=display:flex><span> Mode used when migrating to target graph, include: <span style=color:#ce5c00;font-weight:700>[</span>RESTORING,
</span></span><span style=display:flex><span> MERGING<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Default: RESTORING
</span></span><span style=display:flex><span> Possible Values: <span style=color:#ce5c00;font-weight:700>[</span>NONE, RESTORING, MERGING, LOADING<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> --huge-types, -t
</span></span><span style=display:flex><span> Type of schema/data. Concat with <span style=color:#4e9a06>&#39;,&#39;</span> <span style=color:#204a87;font-weight:700>if</span> more than one. <span style=color:#4e9a06>&#39;all&#39;</span> means
</span></span><span style=display:flex><span> all vertices, edges and schema, in other words, <span style=color:#4e9a06>&#39;all&#39;</span> equals with
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#39;vertex,edge,vertex_label,edge_label,property_key,index_label&#39;</span>
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>[</span>PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> --keep-local-data
</span></span><span style=display:flex><span> Whether to keep the <span style=color:#204a87>local</span> directory of graph data after restored
</span></span><span style=display:flex><span> Default: <span style=color:#204a87>false</span>
</span></span><span style=display:flex><span> --log, -l
</span></span><span style=display:flex><span> Directory of log
</span></span><span style=display:flex><span> Default: ./logs
</span></span><span style=display:flex><span> --retry
</span></span><span style=display:flex><span> Retry times, default is <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span> --split-size, -s
</span></span><span style=display:flex><span> Split size of shard
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>1048576</span>
</span></span><span style=display:flex><span> --target-graph
</span></span><span style=display:flex><span> The name of target graph to migrate
</span></span><span style=display:flex><span> Default: hugegraph
</span></span><span style=display:flex><span> --target-password
</span></span><span style=display:flex><span> The password of target graph to migrate
</span></span><span style=display:flex><span> --target-timeout
</span></span><span style=display:flex><span> The timeout to connect target graph to migrate
</span></span><span style=display:flex><span> Default: <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> --target-trust-store-file
</span></span><span style=display:flex><span> The trust store file of target graph to migrate
</span></span><span style=display:flex><span> --target-trust-store-password
</span></span><span style=display:flex><span> The trust store password of target graph to migrate
</span></span><span style=display:flex><span> --target-url
</span></span><span style=display:flex><span> The url of target graph to migrate
</span></span><span style=display:flex><span> Default: http://127.0.0.1:8081
</span></span><span style=display:flex><span> --target-user
</span></span><span style=display:flex><span> The username of target graph to migrate
</span></span><span style=display:flex><span> -D
</span></span><span style=display:flex><span> HDFS config parameters
</span></span><span style=display:flex><span> Syntax: -Dkey<span style=color:#ce5c00;font-weight:700>=</span>value
</span></span><span style=display:flex><span> Default: <span style=color:#ce5c00;font-weight:700>{}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> deploy Install HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span> Usage: deploy <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * -p
</span></span><span style=display:flex><span> Install path of HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span> -u
</span></span><span style=display:flex><span> Download url prefix path of HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span> * -v
</span></span><span style=display:flex><span> Version of HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> start-all Start HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span> Usage: start-all <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * -p
</span></span><span style=display:flex><span> Install path of HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span> * -v
</span></span><span style=display:flex><span> Version of HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> clear Clear HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span> Usage: clear <span style=color:#ce5c00;font-weight:700>[</span>options<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span> Options:
</span></span><span style=display:flex><span> * -p
</span></span><span style=display:flex><span> Install path of HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> stop-all Stop HugeGraph-Server and HugeGraph-Studio
</span></span><span style=display:flex><span> Usage: stop-all
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87>help</span> Print usage
</span></span><span style=display:flex><span> Usage: <span style=color:#204a87>help</span>
</span></span></code></pre></div><h5 id=39-specific-command-example>3.9 Specific command example</h5><h6 id=1-gremlin-statement>1. gremlin statement</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Execute gremlin synchronously</span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph gremlin-execute --script <span style=color:#4e9a06>&#39;g.V().count()&#39;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Execute gremlin asynchronously</span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph gremlin-schedule --script <span style=color:#4e9a06>&#39;g.V().count()&#39;</span>
</span></span></code></pre></div><h6 id=2-show-task-status>2. Show task status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph task-list
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph task-list --limit <span style=color:#0000cf;font-weight:700>5</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph task-list --status success
</span></span></code></pre></div><h6 id=3-set-and-show-graph-mode>3. Set and show graph mode</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m RESTORING MERGING NONE
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m RESTORING
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-get
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-list
</span></span></code></pre></div><h6 id=4-cleanup-graph>4. Cleanup Graph</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-clear -c <span style=color:#4e9a06>&#34;I&#39;m sure to delete all data&#34;</span>
</span></span></code></pre></div><h6 id=5-backup-graph>5. Backup Graph</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph backup -t all --directory ./backup-test
</span></span></code></pre></div><h6 id=6-periodic-backup-graph>6. Periodic Backup Graph</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph --interval */2 * * * * schedule-backup -d ./backup-0.10.2
</span></span></code></pre></div><h6 id=7-recovery-graph>7. Recovery Graph</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># set graph mode</span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m RESTORING
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># recovery graph</span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph restore -t all --directory ./backup-test
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># restore graph mode</span>
</span></span><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m NONE
</span></span></code></pre></div><h6 id=8-graph-migration>8. Graph Migration</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph migrate --target-url http://127.0.0.1:8090 --target-graph hugegraph
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-e68a801476ae8ef5e45c79949a3a5e44>3.7 - HugeGraph-Computer Quick Start</h1><h2 id=1-hugegraph-computer-overview>1 HugeGraph-Computer Overview</h2><p>The <a href=https://github.com/apache/incubator-hugegraph-computer><code>HugeGraph-Computer</code></a> is a distributed graph processing system for HugeGraph (OLAP). It is an implementation of <a href=https://kowshik.github.io/JPregel/pregel_paper.pdf>Pregel</a>. It runs on Kubernetes framework.</p><h3 id=features>Features</h3><ul><li>Support distributed MPP graph computing, and integrates with HugeGraph as graph input/output storage.</li><li>Based on BSP(Bulk Synchronous Parallel) model, an algorithm performs computing through multiple parallel iterations, every iteration is a superstep.</li><li>Auto memory management. The framework will never be OOM(Out of Memory) since it will split some data to disk if it doesn&rsquo;t have enough memory to hold all the data.</li><li>The part of edges or the messages of super node can be in memory, so you will never lose it.</li><li>You can load the data from HDFS or HugeGraph, or any other system.</li><li>You can output the results to HDFS or HugeGraph, or any other system.</li><li>Easy to develop a new algorithm. You just need to focus on a vertex only processing just like as in a single server, without worrying about message transfer and memory/storage management.</li></ul><h2 id=2-dependency-for-buildingrunning>2 Dependency for Building/Running</h2><h3 id=21-install-java-11-jdk-11>2.1 Install Java 11 (JDK 11)</h3><p><strong>Must</strong> use ≥ <code>Java 11</code> to run <code>Computer</code>, and configure by yourself.</p><p><strong>Be sure to execute the <code>java -version</code> command to check the jdk version before reading</strong></p><h2 id=3-get-started>3 Get Started</h2><h3 id=31-run-pagerank-algorithm-locally>3.1 Run PageRank algorithm locally</h3><blockquote><p>To run algorithm with HugeGraph-Computer, you need to install Java 11 or later versions.</p><p>You also need to deploy HugeGraph-Server and <a href=https://etcd.io/docs/v3.5/quickstart/>Etcd</a>.</p></blockquote><p>There are two ways to get HugeGraph-Computer:</p><ul><li>Download the compiled tarball</li><li>Clone source code then compile and package</li></ul><h4 id=311-download-the-compiled-archive>3.1.1 Download the compiled archive</h4><p>Download the latest version of the HugeGraph-Computer release package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>wget https://downloads.apache.org/incubator/hugegraph/<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>/apache-hugegraph-computer-incubating-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>.tar.gz
</span></span><span style=display:flex><span>tar zxvf apache-hugegraph-computer-incubating-<span style=color:#4e9a06>${</span><span style=color:#000>version</span><span style=color:#4e9a06>}</span>.tar.gz -C hugegraph-computer
</span></span></code></pre></div><h4 id=312-clone-source-code-to-compile-and-package>3.1.2 Clone source code to compile and package</h4><p>Clone the latest version of HugeGraph-Computer source package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>$ git clone https://github.com/apache/hugegraph-computer.git
</span></span></code></pre></div><p>Compile and generate tar package:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> hugegraph-computer
</span></span><span style=display:flex><span>mvn clean package -DskipTests
</span></span></code></pre></div><h4 id=313-start-master-node>3.1.3 Start master node</h4><blockquote><p>You can use <code>-c</code> parameter specify the configuration file, more computer config please see:<a href=/docs/config/config-computer#computer-config-options>Computer Config Options</a></p></blockquote><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#204a87>cd</span> hugegraph-computer
</span></span><span style=display:flex><span>bin/start-computer.sh -d <span style=color:#204a87>local</span> -r master
</span></span></code></pre></div><h4 id=314-start-worker-node>3.1.4 Start worker node</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/start-computer.sh -d <span style=color:#204a87>local</span> -r worker
</span></span></code></pre></div><h4 id=315-query-algorithm-results>3.1.5 Query algorithm results</h4><p>3.1.5.1 Enable <code>OLAP</code> index query for server</p><p>If OLAP index is not enabled, it needs to enable, more reference: <a href=/docs/clients/restful-api/graphs/#634-modify-graphs-read-mode-this-operation-requires-administrator-privileges>modify-graphs-read-mode</a></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-http data-lang=http><span style=display:flex><span><span style=color:#a40000>PUT http://localhost:8080/graphs/hugegraph/graph_read_mode
</span></span></span><span style=display:flex><span><span style=color:#a40000>
</span></span></span><span style=display:flex><span><span style=color:#a40000>&#34;ALL&#34;
</span></span></span></code></pre></div><p>3.1.5.2 Query <code>page_rank</code> property value:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl <span style=color:#4e9a06>&#34;http://localhost:8080/graphs/hugegraph/graph/vertices?page&amp;limit=3&#34;</span> <span style=color:#000;font-weight:700>|</span> gunzip
</span></span></code></pre></div><h3 id=32-run-pagerank-algorithm-in-kubernetes>3.2 Run PageRank algorithm in Kubernetes</h3><blockquote><p>To run algorithm with HugeGraph-Computer you need to deploy HugeGraph-Server first</p></blockquote><h4 id=321-install-hugegraph-computer-crd>3.2.1 Install HugeGraph-Computer CRD</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Kubernetes version &gt;= v1.16</span>
</span></span><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/hugegraph-computer/master/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Kubernetes version &lt; v1.16</span>
</span></span><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/hugegraph-computer/master/computer-k8s-operator/manifest/hugegraph-computer-crd.v1beta1.yaml
</span></span></code></pre></div><h4 id=322-show-crd>3.2.2 Show CRD</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get crd
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>NAME CREATED AT
</span></span><span style=display:flex><span>hugegraphcomputerjobs.hugegraph.apache.org 2021-09-16T08:01:08Z
</span></span></code></pre></div><h4 id=323-install-hugegraph-computer-operatoretcd-server>3.2.3 Install hugegraph-computer-operator&etcd-server</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl apply -f https://raw.githubusercontent.com/apache/hugegraph-computer/master/computer-k8s-operator/manifest/hugegraph-computer-operator.yaml
</span></span></code></pre></div><h4 id=324-wait-for-hugegraph-computer-operatoretcd-server-deployment-to-complete>3.2.4 Wait for hugegraph-computer-operator&etcd-server deployment to complete</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get pod -n hugegraph-computer-operator-system
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>NAME READY STATUS RESTARTS AGE
</span></span><span style=display:flex><span>hugegraph-computer-operator-controller-manager-58c5545949-jqvzl 1/1 Running <span style=color:#0000cf;font-weight:700>0</span> 15h
</span></span><span style=display:flex><span>hugegraph-computer-operator-etcd-28lm67jxk5 1/1 Running <span style=color:#0000cf;font-weight:700>0</span> 15h
</span></span></code></pre></div><h4 id=325-submit-job>3.2.5 Submit job</h4><blockquote><p>More computer crd please see: <a href=/docs/config/config-computer#hugegraph-computer-crd>Computer CRD</a></p><p>More computer config please see: <a href=/docs/config/config-computer#computer-config-options>Computer Config Options</a></p></blockquote><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#000>cat &lt;&lt;EOF | kubectl apply --filename -</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>apiVersion</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph.apache.org/v1</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>kind</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>HugeGraphComputerJob</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>metadata</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>namespace</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph-computer-operator-system</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic>&amp;jobName</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>pagerank-sample</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>spec</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>jobId</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic>*jobName</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>algorithmName</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>page_rank</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hugegraph-computer:latest</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># algorithm image url</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>jarFile</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>/hugegraph/hugegraph-computer/algorithm/builtin-algorithm.jar</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># algorithm jar path</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>pullPolicy</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>Always</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>workerCpu</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;4&#34;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>workerMemory</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;4Gi&#34;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>workerInstances</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>5</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>computerConf</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>job.partitions_count</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#34;20&#34;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>algorithm.params_class</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.computer.algorithm.centrality.pagerank.PageRankParams</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.url</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>http://${hugegraph-server-host}:${hugegraph-server-port}</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># hugegraph server url</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># hugegraph graph name</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#000>EOF</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><h4 id=326-show-job>3.2.6 Show job</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get hcjob/pagerank-sample -n hugegraph-computer-operator-system
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>NAME JOBID JOBSTATUS
</span></span><span style=display:flex><span>pagerank-sample pagerank-sample RUNNING
</span></span></code></pre></div><h4 id=327-show-log-of-nodes>3.2.7 Show log of nodes</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Show the master log</span>
</span></span><span style=display:flex><span>kubectl logs -l <span style=color:#000>component</span><span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample-master -n hugegraph-computer-operator-system
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Show the worker log</span>
</span></span><span style=display:flex><span>kubectl logs -l <span style=color:#000>component</span><span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample-worker -n hugegraph-computer-operator-system
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Show diagnostic log of a job</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># NOTE: diagnostic log exist only when the job fails, and it will only be saved for one hour.</span>
</span></span><span style=display:flex><span>kubectl get event --field-selector <span style=color:#000>reason</span><span style=color:#ce5c00;font-weight:700>=</span>ComputerJobFailed --field-selector involvedObject.name<span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample -n hugegraph-computer-operator-system
</span></span></code></pre></div><h4 id=328-show-success-event-of-a-job>3.2.8 Show success event of a job</h4><blockquote><p>NOTE: it will only be saved for one hour</p></blockquote><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get event --field-selector <span style=color:#000>reason</span><span style=color:#ce5c00;font-weight:700>=</span>ComputerJobSucceed --field-selector involvedObject.name<span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample -n hugegraph-computer-operator-system
</span></span></code></pre></div><h4 id=329-query-algorithm-results>3.2.9 Query algorithm results</h4><p>If the output to <code>Hugegraph-Server</code> is consistent with Locally, if output to <code>HDFS</code>, please check the result file in the directory of <code>/hugegraph-computer/results/{jobId}</code> directory.</p><h2 id=4-built-in-algorithms-document>4 Built-In algorithms document</h2><h3 id=41-supported-algorithms-list>4.1 Supported algorithms list:</h3><h6 id=centrality-algorithm>Centrality Algorithm:</h6><ul><li>PageRank</li><li>BetweennessCentrality</li><li>ClosenessCentrality</li><li>DegreeCentrality</li></ul><h6 id=community-algorithm>Community Algorithm:</h6><ul><li>ClusteringCoefficient</li><li>Kcore</li><li>Lpa</li><li>TriangleCount</li><li>Wcc</li></ul><h6 id=path-algorithm>Path Algorithm:</h6><ul><li>RingsDetection</li><li>RingsDetectionWithFilter</li></ul><p>More algorithms please see: <a href=https://github.com/apache/hugegraph-computer/tree/master/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm>Built-In algorithms</a></p><h3 id=42-algorithm-describe>4.2 Algorithm describe</h3><p>TODO</p><h2 id=5-algorithm-development-guide>5 Algorithm development guide</h2><p>TODO</p><h2 id=6-note>6 Note</h2><ul><li>If some classes under computer-k8s cannot be found, you need to execute <code>mvn compile</code> in advance to generate corresponding classes.</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-5074334c73aa450364a31470231ebff8>4 - Config</h1></div><div class=td-content><h1 id=pg-af7e8f1dc385b255c4f38b3cbafe224a>4.1 - HugeGraph configuration</h1><h3 id=1-overview>1 Overview</h3><p>The directory for the configuration files is <code>hugegraph-release/conf</code>, and all the configurations related to the service and the graph itself are located in this directory.</p><p>The main configuration files include <code>gremlin-server.yaml</code>, <code>rest-server.properties</code>, and <code>hugegraph.properties</code>.</p><p>The <code>HugeGraphServer</code> integrates the <code>GremlinServer</code> and <code>RestServer</code> internally, and <code>gremlin-server.yaml</code> and <code>rest-server.properties</code> are used to configure these two servers.</p><ul><li><a href=http://tinkerpop.apache.org/docs/3.2.3/reference/#gremlin-server>GremlinServer</a>: GremlinServer accepts Gremlin statements from users, parses them, and then invokes the Core code.</li><li>RestServer: It provides a RESTful API that, based on different HTTP requests, calls the corresponding Core API. If the user&rsquo;s request body is a Gremlin statement, it will be forwarded to GremlinServer to perform operations on the graph data.</li></ul><p>Now let&rsquo;s introduce these three configuration files one by one.</p><h3 id=2-gremlin-serveryaml>2. gremlin-server.yaml</h3><p>The default content of the <code>gremlin-server.yaml</code> file is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#8f5902;font-style:italic># host and port of gremlin server, need to be consistent with host and port in rest-server.properties</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic>#host: 127.0.0.1</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic>#port: 8182</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic># timeout in ms of gremlin query</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>evaluationTimeout</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>30000</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>channelizer</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic># don&#39;t set graph at here, this happens after support for dynamically adding graph</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>graphs</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>scriptEngines</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>gremlin-groovy</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>staticImports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.opencypher.gremlin.process.traversal.CustomPredicates.*&#39;,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.opencypher.gremlin.traversal.CustomFunctions.*</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>],</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>plugins</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>org.apache.hugegraph.plugin.HugeGraphGremlinPlugin</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{}<span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{}<span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>classImports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>java.lang.Math,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.backend.id.IdGenerator,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.type.define.Directions,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.type.define.NodeRole,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.CollectionPathsTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.CountTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.CustomizedCrosspointsTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.CustomizePathsTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.FusiformSimilarityTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.HugeTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.JaccardSimilarTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.KneighborTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.KoutTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.MultiNodeShortestPathTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.NeighborRankTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.PathsTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.PersonalRankTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.SameNeighborTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.ShortestPathTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.SingleSourceShortestPathTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.SubGraphTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.TemplatePathsTraverser,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.steps.EdgeStep,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.steps.RepeatEdgeStep,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.algorithm.steps.WeightedEdgeStep,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.optimize.ConditionP,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.optimize.Text,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.traversal.optimize.TraversalUtil,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.util.DateUtil,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.opencypher.gremlin.traversal.CustomFunctions,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.opencypher.gremlin.traversal.CustomPredicate</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>],</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>methodImports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>java.lang.Math#*,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.opencypher.gremlin.traversal.CustomPredicate#*,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.opencypher.gremlin.traversal.CustomFunctions#*</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>files</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#000>scripts/empty-sample.groovy]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>serializers</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- {<span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>className</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>config</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>serializeResultToString</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ioRegistries</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#000>org.apache.hugegraph.io.HugeGraphIoRegistry]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- {<span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>className</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>config</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>serializeResultToString</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ioRegistries</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#000>org.apache.hugegraph.io.HugeGraphIoRegistry]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- {<span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>className</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV2d0,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>config</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>serializeResultToString</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ioRegistries</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#000>org.apache.hugegraph.io.HugeGraphIoRegistry]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- {<span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>className</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>config</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>serializeResultToString</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ioRegistries</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#000>org.apache.hugegraph.io.HugeGraphIoRegistry]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>metrics</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>consoleReporter</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#204a87;font-weight:700>enabled: false, interval</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>180000</span>}<span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>csvReporter</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#204a87;font-weight:700>enabled: false, interval: 180000, fileName</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>./metrics/gremlin-server-metrics.csv},</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>jmxReporter</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#204a87;font-weight:700>enabled</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>false</span>}<span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>slf4jReporter</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#204a87;font-weight:700>enabled: false, interval</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>180000</span>}<span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>gangliaReporter</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#204a87;font-weight:700>enabled: false, interval: 180000, addressingMode</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>MULTICAST},</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>graphiteReporter</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#204a87;font-weight:700>enabled: false, interval</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>180000</span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>maxInitialLineLength</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>4096</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>maxHeaderSize</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>8192</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>maxChunkSize</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>8192</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>maxContentLength</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>65536</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>maxAccumulationBufferComponents</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>1024</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>resultIterationBatchSize</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>64</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>writeBufferLowWaterMark</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>32768</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>writeBufferHighWaterMark</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>65536</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>ssl</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>enabled</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>false</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><p>There are many configuration options mentioned above, but for now, let&rsquo;s focus on the following options: <code>channelizer</code> and <code>graphs</code>.</p><ul><li><code>graphs</code>: This option specifies the graphs that need to be opened when the GremlinServer starts. It is a map structure where the key is the name of the graph and the value is the configuration file path for that graph.</li><li><code>channelizer</code>: The GremlinServer supports two communication modes with clients: WebSocket and HTTP (default). If WebSocket is chosen, users can quickly experience the features of HugeGraph using <a href=/clients/gremlin-console.html>Gremlin-Console</a>, but it does not support importing large-scale data. It is recommended to use HTTP for communication, as all peripheral components of HugeGraph are implemented based on HTTP.</li></ul><p>By default, the GremlinServer serves at <code>localhost:8182</code>. If you need to modify it, configure the <code>host</code> and <code>port</code> settings.</p><ul><li><code>host</code>: The hostname or IP address of the machine where the GremlinServer is deployed. Currently, HugeGraphServer does not support distributed deployment, and GremlinServer is not directly exposed to users.</li><li><code>port</code>: The port number of the machine where the GremlinServer is deployed.</li></ul><p>Additionally, you need to add the corresponding configuration <code>gremlinserver.url=http://host:port</code> in <code>rest-server.properties</code>.</p><h3 id=3-rest-serverproperties>3. rest-server.properties</h3><p>The default content of the <code>rest-server.properties</code> file is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span># bind url
</span></span><span style=display:flex><span>restserver.url=http://127.0.0.1:8080
</span></span><span style=display:flex><span># gremlin server url, need to be consistent with host and port in gremlin-server.yaml
</span></span><span style=display:flex><span>#gremlinserver.url=http://127.0.0.1:8182
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># graphs list with pair NAME:CONF_PATH
</span></span><span style=display:flex><span>graphs=[hugegraph:conf/hugegraph.properties]
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># authentication
</span></span><span style=display:flex><span>#auth.authenticator=
</span></span><span style=display:flex><span>#auth.admin_token=
</span></span><span style=display:flex><span>#auth.user_tokens=[]
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>server.id=server-1
</span></span><span style=display:flex><span>server.role=master
</span></span></code></pre></div><ul><li><code>restserver.url</code>: The URL at which the RestServer provides its services. Modify it according to the actual environment.</li><li><code>graphs</code>: The RestServer also needs to open graphs when it starts. This option is a map structure where the key is the name of the graph and the value is the configuration file path for that graph.</li></ul><blockquote><p>Note: Both <code>gremlin-server.yaml</code> and <code>rest-server.properties</code> contain the <code>graphs</code> configuration option, and the <code>init-store</code> command initializes based on the graphs specified in the <code>graphs</code> section of <code>gremlin-server.yaml</code>.</p></blockquote><blockquote><p>The <code>gremlinserver.url</code> configuration option is the URL at which the GremlinServer provides services to the RestServer. By default, it is set to <code>http://localhost:8182</code>. If you need to modify it, it should match the <code>host</code> and <code>port</code> settings in <code>gremlin-server.yaml</code>.</p></blockquote><h3 id=4-hugegraphproperties>4. hugegraph.properties</h3><p><code>hugegraph.properties</code> is a type of file. If the system has multiple graphs, there will be multiple similar files. This file is used to configure parameters related to graph storage and querying. The default content of the file is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span># gremlin entrence to create graph
</span></span><span style=display:flex><span>gremlin.graph=org.apache.hugegraph.HugeFactory
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># cache config
</span></span><span style=display:flex><span>#schema.cache_capacity=100000
</span></span><span style=display:flex><span># vertex-cache default is 1000w, 10min expired
</span></span><span style=display:flex><span>#vertex.cache_capacity=10000000
</span></span><span style=display:flex><span>#vertex.cache_expire=600
</span></span><span style=display:flex><span># edge-cache default is 100w, 10min expired
</span></span><span style=display:flex><span>#edge.cache_capacity=1000000
</span></span><span style=display:flex><span>#edge.cache_expire=600
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># schema illegal name template
</span></span><span style=display:flex><span>#schema.illegal_name_regex=\s+|~.*
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>#vertex.default_label=vertex
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>backend=rocksdb
</span></span><span style=display:flex><span>serializer=binary
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>store=hugegraph
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>raft.mode=false
</span></span><span style=display:flex><span>raft.safe_read=false
</span></span><span style=display:flex><span>raft.use_snapshot=false
</span></span><span style=display:flex><span>raft.endpoint=127.0.0.1:8281
</span></span><span style=display:flex><span>raft.group_peers=127.0.0.1:8281,127.0.0.1:8282,127.0.0.1:8283
</span></span><span style=display:flex><span>raft.path=./raft-log
</span></span><span style=display:flex><span>raft.use_replicator_pipeline=true
</span></span><span style=display:flex><span>raft.election_timeout=10000
</span></span><span style=display:flex><span>raft.snapshot_interval=3600
</span></span><span style=display:flex><span>raft.backend_threads=48
</span></span><span style=display:flex><span>raft.read_index_threads=8
</span></span><span style=display:flex><span>raft.queue_size=16384
</span></span><span style=display:flex><span>raft.queue_publish_timeout=60
</span></span><span style=display:flex><span>raft.apply_batch=1
</span></span><span style=display:flex><span>raft.rpc_threads=80
</span></span><span style=display:flex><span>raft.rpc_connect_timeout=5000
</span></span><span style=display:flex><span>raft.rpc_timeout=60000
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># if use &#39;ikanalyzer&#39;, need download jar from &#39;https://github.com/apache/hugegraph-doc/raw/ik_binary/dist/server/ikanalyzer-2012_u6.jar&#39; to lib directory
</span></span><span style=display:flex><span>search.text_analyzer=jieba
</span></span><span style=display:flex><span>search.text_analyzer_mode=INDEX
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># rocksdb backend config
</span></span><span style=display:flex><span>#rocksdb.data_path=/path/to/disk
</span></span><span style=display:flex><span>#rocksdb.wal_path=/path/to/disk
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># cassandra backend config
</span></span><span style=display:flex><span>cassandra.host=localhost
</span></span><span style=display:flex><span>cassandra.port=9042
</span></span><span style=display:flex><span>cassandra.username=
</span></span><span style=display:flex><span>cassandra.password=
</span></span><span style=display:flex><span>#cassandra.connect_timeout=5
</span></span><span style=display:flex><span>#cassandra.read_timeout=20
</span></span><span style=display:flex><span>#cassandra.keyspace.strategy=SimpleStrategy
</span></span><span style=display:flex><span>#cassandra.keyspace.replication=3
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># hbase backend config
</span></span><span style=display:flex><span>#hbase.hosts=localhost
</span></span><span style=display:flex><span>#hbase.port=2181
</span></span><span style=display:flex><span>#hbase.znode_parent=/hbase
</span></span><span style=display:flex><span>#hbase.threads_max=64
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># mysql backend config
</span></span><span style=display:flex><span>#jdbc.driver=com.mysql.jdbc.Driver
</span></span><span style=display:flex><span>#jdbc.url=jdbc:mysql://127.0.0.1:3306
</span></span><span style=display:flex><span>#jdbc.username=root
</span></span><span style=display:flex><span>#jdbc.password=
</span></span><span style=display:flex><span>#jdbc.reconnect_max_times=3
</span></span><span style=display:flex><span>#jdbc.reconnect_interval=3
</span></span><span style=display:flex><span>#jdbc.ssl_mode=false
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># postgresql &amp; cockroachdb backend config
</span></span><span style=display:flex><span>#jdbc.driver=org.postgresql.Driver
</span></span><span style=display:flex><span>#jdbc.url=jdbc:postgresql://localhost:5432/
</span></span><span style=display:flex><span>#jdbc.username=postgres
</span></span><span style=display:flex><span>#jdbc.password=
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># palo backend config
</span></span><span style=display:flex><span>#palo.host=127.0.0.1
</span></span><span style=display:flex><span>#palo.poll_interval=10
</span></span><span style=display:flex><span>#palo.temp_dir=./palo-data
</span></span><span style=display:flex><span>#palo.file_limit_size=32
</span></span></code></pre></div><p>Pay attention to the following uncommented items:</p><ul><li><code>gremlin.graph</code>: The entry point for GremlinServer startup. Users should not modify this item.</li><li><code>backend</code>: The backend storage used, with options including <code>memory</code>, <code>cassandra</code>, <code>scylladb</code>, <code>mysql</code>, <code>hbase</code>, <code>postgresql</code>, and <code>rocksdb</code>.</li><li><code>serializer</code>: Mainly for internal use, used to serialize schema, vertices, and edges to the backend. The corresponding options are <code>text</code>, <code>cassandra</code>, <code>scylladb</code>, and <code>binary</code> (Note: The <code>rocksdb</code> backend should have a value of <code>binary</code>, while for other backends, the values of <code>backend</code> and <code>serializer</code> should remain consistent. For example, for the <code>hbase</code> backend, the value should be <code>hbase</code>).</li><li><code>store</code>: The name of the database used for storing the graph in the backend. In Cassandra and ScyllaDB, it corresponds to the keyspace name. The value of this item is unrelated to the graph name in GremlinServer and RestServer, but for clarity, it is recommended to use the same name.</li><li><code>cassandra.host</code>: This item is only meaningful when the backend is set to <code>cassandra</code> or <code>scylladb</code>. It specifies the seeds of the Cassandra/ScyllaDB cluster.</li><li><code>cassandra.port</code>: This item is only meaningful when the backend is set to <code>cassandra</code> or <code>scylladb</code>. It specifies the native port of the Cassandra/ScyllaDB cluster.</li><li><code>rocksdb.data_path</code>: This item is only meaningful when the backend is set to <code>rocksdb</code>. It specifies the data directory for RocksDB.</li><li><code>rocksdb.wal_path</code>: This item is only meaningful when the backend is set to <code>rocksdb</code>. It specifies the log directory for RocksDB.</li><li><code>admin.token</code>: A token used to retrieve server configuration information. For example: <a href="http://localhost:8080/graphs/hugegraph/conf?token=162f7848-0b6d-4faf-b557-3a0797869c55">http://localhost:8080/graphs/hugegraph/conf?token=162f7848-0b6d-4faf-b557-3a0797869c55</a></li></ul><h3 id=5-multi-graph-configuration>5. Multi-Graph Configuration</h3><p>Our system can have multiple graphs, and the backend of each graph can be different, such as <code>hugegraph_rocksdb</code> and <code>hugegraph_mysql</code>, where <code>hugegraph_rocksdb</code> uses <code>RocksDB</code> as the backend, and <code>hugegraph_mysql</code> uses <code>MySQL</code> as a backend.</p><p>The configuration method is simple:</p><p><strong>[Optional]: Modify <code>rest-server.properties</code></strong></p><p>You can modify the graph profile directory in the <code>graphs</code> option of <code>rest-server.properties</code>. The default configuration is <code>graphs=./conf/graphs</code>, if you want to change it to another directory then adjust the <code>graphs</code> option, e.g. adjust it to <code>graphs=/etc/hugegraph/graphs</code>, example is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>graphs=./conf/graphs
</span></span></code></pre></div><p>Modify <code>hugegraph_mysql_backend.properties</code> and <code>hugegraph_rocksdb_backend.properties</code> based on <code>hugegraph.properties</code> under <code>conf/graphs</code> path</p><p>The modified part of <code>hugegraph_mysql_backend.properties</code> is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=mysql
</span></span><span style=display:flex><span>serializer=mysql
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>store=hugegraph_mysql
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># mysql backend config
</span></span><span style=display:flex><span>jdbc.driver=com.mysql.cj.jdbc.Driver
</span></span><span style=display:flex><span>jdbc.url=jdbc:mysql://127.0.0.1:3306
</span></span><span style=display:flex><span>jdbc.username=root
</span></span><span style=display:flex><span>jdbc.password=123456
</span></span><span style=display:flex><span>jdbc.reconnect_max_times=3
</span></span><span style=display:flex><span>jdbc.reconnect_interval=3
</span></span><span style=display:flex><span>jdbc.ssl_mode=false
</span></span></code></pre></div><p>The modified part of <code>hugegraph_rocksdb_backend.properties</code> is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=rocksdb
</span></span><span style=display:flex><span>serializer=binary
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>store=hugegraph_rocksdb
</span></span></code></pre></div><p><strong>Stop the server, execute <code>init-store.sh</code> (to create a new database for the new graph), and restart the server.</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>$ ./bin/stop-hugegraph.sh
</span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>$ ./bin/init-store.sh
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Initializing HugeGraph Store...
</span></span><span style=display:flex><span>2023-06-11 14:16:14 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.u.ConfigUtil - Scanning option <span style=color:#4e9a06>&#39;graphs&#39;</span> directory <span style=color:#4e9a06>&#39;./conf/graphs&#39;</span>
</span></span><span style=display:flex><span>2023-06-11 14:16:14 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.c.InitStore - Init graph with config file: ./conf/graphs/hugegraph_rocksdb_backend.properties
</span></span><span style=display:flex><span>...
</span></span><span style=display:flex><span>2023-06-11 14:16:15 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.StandardHugeGraph - Graph <span style=color:#4e9a06>&#39;hugegraph_rocksdb&#39;</span> has been initialized
</span></span><span style=display:flex><span>2023-06-11 14:16:15 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.c.InitStore - Init graph with config file: ./conf/graphs/hugegraph_mysql_backend.properties
</span></span><span style=display:flex><span>...
</span></span><span style=display:flex><span>2023-06-11 14:16:16 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.StandardHugeGraph - Graph <span style=color:#4e9a06>&#39;hugegraph_mysql&#39;</span> has been initialized
</span></span><span style=display:flex><span>2023-06-11 14:16:16 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.StandardHugeGraph - Close graph standardhugegraph<span style=color:#ce5c00;font-weight:700>[</span>hugegraph_rocksdb<span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span>...
</span></span><span style=display:flex><span>2023-06-11 14:16:16 <span style=color:#ce5c00;font-weight:700>[</span>main<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.HugeFactory - HugeFactory shutdown
</span></span><span style=display:flex><span>2023-06-11 14:16:16 <span style=color:#ce5c00;font-weight:700>[</span>hugegraph-shutdown<span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span>INFO<span style=color:#ce5c00;font-weight:700>]</span> o.a.h.HugeFactory - HugeGraph is shutting down
</span></span><span style=display:flex><span>Initialization finished.
</span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>$ ./bin/start-hugegraph.sh
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Starting HugeGraphServer...
</span></span><span style=display:flex><span>Connecting to HugeGraphServer <span style=color:#ce5c00;font-weight:700>(</span>http://127.0.0.1:8080/graphs<span style=color:#ce5c00;font-weight:700>)</span>...OK
</span></span><span style=display:flex><span>Started <span style=color:#ce5c00;font-weight:700>[</span>pid 21614<span style=color:#ce5c00;font-weight:700>]</span>
</span></span></code></pre></div><p>Check out created graphs:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl http://127.0.0.1:8080/graphs/
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;graphs&#34;</span>:<span style=color:#ce5c00;font-weight:700>[</span><span style=color:#4e9a06>&#34;hugegraph_rocksdb&#34;</span>,<span style=color:#4e9a06>&#34;hugegraph_mysql&#34;</span><span style=color:#ce5c00;font-weight:700>]}</span>
</span></span></code></pre></div><p>Get details of the graph</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl http://127.0.0.1:8080/graphs/hugegraph_mysql_backend
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;hugegraph_mysql&#34;</span>,<span style=color:#4e9a06>&#34;backend&#34;</span>:<span style=color:#4e9a06>&#34;mysql&#34;</span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl http://127.0.0.1:8080/graphs/hugegraph_rocksdb_backend
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>{</span><span style=color:#4e9a06>&#34;name&#34;</span>:<span style=color:#4e9a06>&#34;hugegraph_rocksdb&#34;</span>,<span style=color:#4e9a06>&#34;backend&#34;</span>:<span style=color:#4e9a06>&#34;rocksdb&#34;</span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-6bfbb2db4e1f281942d741cef305e724>4.2 - HugeGraph Config Options</h1><h3 id=gremlin-server-config-options>Gremlin Server Config Options</h3><p>Corresponding configuration file <code>gremlin-server.yaml</code></p><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>host</td><td>127.0.0.1</td><td>The host or ip of Gremlin Server.</td></tr><tr><td>port</td><td>8182</td><td>The listening port of Gremlin Server.</td></tr><tr><td>graphs</td><td>hugegraph: conf/hugegraph.properties</td><td>The map of graphs with name and config file path.</td></tr><tr><td>scriptEvaluationTimeout</td><td>30000</td><td>The timeout for gremlin script execution(millisecond).</td></tr><tr><td>channelizer</td><td>org.apache.tinkerpop.gremlin.server.channel.HttpChannelizer</td><td>Indicates the protocol which the Gremlin Server provides service.</td></tr><tr><td>authentication</td><td>authenticator: org.apache.hugegraph.auth.StandardAuthenticator, config: {tokens: conf/rest-server.properties}</td><td>The authenticator and config(contains tokens path) of authentication mechanism.</td></tr></tbody></table><h3 id=rest-server--api-config-options>Rest Server & API Config Options</h3><p>Corresponding configuration file <code>rest-server.properties</code></p><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>graphs</td><td>[hugegraph:conf/hugegraph.properties]</td><td>The map of graphs&rsquo; name and config file.</td></tr><tr><td>server.id</td><td>server-1</td><td>The id of rest server, used for license verification.</td></tr><tr><td>server.role</td><td>master</td><td>The role of nodes in the cluster, available types are [master, worker, computer]</td></tr><tr><td>restserver.url</td><td>http://127.0.0.1:8080</td><td>The url for listening of rest server.</td></tr><tr><td>ssl.keystore_file</td><td>server.keystore</td><td>The path of server keystore file used when https protocol is enabled.</td></tr><tr><td>ssl.keystore_password</td><td></td><td>The password of the path of the server keystore file used when the https protocol is enabled.</td></tr><tr><td>restserver.max_worker_threads</td><td>2 * CPUs</td><td>The maximum worker threads of rest server.</td></tr><tr><td>restserver.min_free_memory</td><td>64</td><td>The minimum free memory(MB) of rest server, requests will be rejected when the available memory of system is lower than this value.</td></tr><tr><td>restserver.request_timeout</td><td>30</td><td>The time in seconds within which a request must complete, -1 means no timeout.</td></tr><tr><td>restserver.connection_idle_timeout</td><td>30</td><td>The time in seconds to keep an inactive connection alive, -1 means no timeout.</td></tr><tr><td>restserver.connection_max_requests</td><td>256</td><td>The max number of HTTP requests allowed to be processed on one keep-alive connection, -1 means unlimited.</td></tr><tr><td>gremlinserver.url</td><td>http://127.0.0.1:8182</td><td>The url of gremlin server.</td></tr><tr><td>gremlinserver.max_route</td><td>8</td><td>The max route number for gremlin server.</td></tr><tr><td>gremlinserver.timeout</td><td>30</td><td>The timeout in seconds of waiting for gremlin server.</td></tr><tr><td>batch.max_edges_per_batch</td><td>500</td><td>The maximum number of edges submitted per batch.</td></tr><tr><td>batch.max_vertices_per_batch</td><td>500</td><td>The maximum number of vertices submitted per batch.</td></tr><tr><td>batch.max_write_ratio</td><td>50</td><td>The maximum thread ratio for batch writing, only take effect if the batch.max_write_threads is 0.</td></tr><tr><td>batch.max_write_threads</td><td>0</td><td>The maximum threads for batch writing, if the value is 0, the actual value will be set to batch.max_write_ratio * restserver.max_worker_threads.</td></tr><tr><td>auth.authenticator</td><td></td><td>The class path of authenticator implementation. e.g., org.apache.hugegraph.auth.StandardAuthenticator, or org.apache.hugegraph.auth.ConfigAuthenticator.</td></tr><tr><td>auth.admin_token</td><td>162f7848-0b6d-4faf-b557-3a0797869c55</td><td>Token for administrator operations, only for org.apache.hugegraph.auth.ConfigAuthenticator.</td></tr><tr><td>auth.graph_store</td><td>hugegraph</td><td>The name of graph used to store authentication information, like users, only for org.apache.hugegraph.auth.StandardAuthenticator.</td></tr><tr><td>auth.user_tokens</td><td>[hugegraph:9fd95c9c-711b-415b-b85f-d4df46ba5c31]</td><td>The map of user tokens with name and password, only for org.apache.hugegraph.auth.ConfigAuthenticator.</td></tr><tr><td>auth.audit_log_rate</td><td>1000.0</td><td>The max rate of audit log output per user, default value is 1000 records per second.</td></tr><tr><td>auth.cache_capacity</td><td>10240</td><td>The max cache capacity of each auth cache item.</td></tr><tr><td>auth.cache_expire</td><td>600</td><td>The expiration time in seconds of vertex cache.</td></tr><tr><td>auth.remote_url</td><td></td><td>If the address is empty, it provide auth service, otherwise it is auth client and also provide auth service through rpc forwarding. The remote url can be set to multiple addresses, which are concat by &lsquo;,&rsquo;.</td></tr><tr><td>auth.token_expire</td><td>86400</td><td>The expiration time in seconds after token created</td></tr><tr><td>auth.token_secret</td><td>FXQXbJtbCLxODc6tGci732pkH1cyf8Qg</td><td>Secret key of HS256 algorithm.</td></tr><tr><td>exception.allow_trace</td><td>false</td><td>Whether to allow exception trace stack.</td></tr></tbody></table><h3 id=basic-config-options>Basic Config Options</h3><p>Basic Config Options and Backend Config Options correspond to configuration files:{graph-name}.properties, such as <code>hugegraph.properties</code></p><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>gremlin.graph</td><td>org.apache.hugegraph.HugeFactory</td><td>Gremlin entrance to create graph.</td></tr><tr><td>backend</td><td>rocksdb</td><td>The data store type, available values are [memory, rocksdb, cassandra, scylladb, hbase, mysql].</td></tr><tr><td>serializer</td><td>binary</td><td>The serializer for backend store, available values are [text, binary, cassandra, hbase, mysql].</td></tr><tr><td>store</td><td>hugegraph</td><td>The database name like Cassandra Keyspace.</td></tr><tr><td>store.connection_detect_interval</td><td>600</td><td>The interval in seconds for detecting connections, if the idle time of a connection exceeds this value, detect it and reconnect if needed before using, value 0 means detecting every time.</td></tr><tr><td>store.graph</td><td>g</td><td>The graph table name, which store vertex, edge and property.</td></tr><tr><td>store.schema</td><td>m</td><td>The schema table name, which store meta data.</td></tr><tr><td>store.system</td><td>s</td><td>The system table name, which store system data.</td></tr><tr><td>schema.illegal_name_regex</td><td>.<em>\s+$|~.</em></td><td>The regex specified the illegal format for schema name.</td></tr><tr><td>schema.cache_capacity</td><td>10000</td><td>The max cache size(items) of schema cache.</td></tr><tr><td>vertex.cache_type</td><td>l2</td><td>The type of vertex cache, allowed values are [l1, l2].</td></tr><tr><td>vertex.cache_capacity</td><td>10000000</td><td>The max cache size(items) of vertex cache.</td></tr><tr><td>vertex.cache_expire</td><td>600</td><td>The expire time in seconds of vertex cache.</td></tr><tr><td>vertex.check_customized_id_exist</td><td>false</td><td>Whether to check the vertices exist for those using customized id strategy.</td></tr><tr><td>vertex.default_label</td><td>vertex</td><td>The default vertex label.</td></tr><tr><td>vertex.tx_capacity</td><td>10000</td><td>The max size(items) of vertices(uncommitted) in transaction.</td></tr><tr><td>vertex.check_adjacent_vertex_exist</td><td>false</td><td>Whether to check the adjacent vertices of edges exist.</td></tr><tr><td>vertex.lazy_load_adjacent_vertex</td><td>true</td><td>Whether to lazy load adjacent vertices of edges.</td></tr><tr><td>vertex.part_edge_commit_size</td><td>5000</td><td>Whether to enable the mode to commit part of edges of vertex, enabled if commit size > 0, 0 means disabled.</td></tr><tr><td>vertex.encode_primary_key_number</td><td>true</td><td>Whether to encode number value of primary key in vertex id.</td></tr><tr><td>vertex.remove_left_index_at_overwrite</td><td>false</td><td>Whether remove left index at overwrite.</td></tr><tr><td>edge.cache_type</td><td>l2</td><td>The type of edge cache, allowed values are [l1, l2].</td></tr><tr><td>edge.cache_capacity</td><td>1000000</td><td>The max cache size(items) of edge cache.</td></tr><tr><td>edge.cache_expire</td><td>600</td><td>The expiration time in seconds of edge cache.</td></tr><tr><td>edge.tx_capacity</td><td>10000</td><td>The max size(items) of edges(uncommitted) in transaction.</td></tr><tr><td>query.page_size</td><td>500</td><td>The size of each page when querying by paging.</td></tr><tr><td>query.batch_size</td><td>1000</td><td>The size of each batch when querying by batch.</td></tr><tr><td>query.ignore_invalid_data</td><td>true</td><td>Whether to ignore invalid data of vertex or edge.</td></tr><tr><td>query.index_intersect_threshold</td><td>1000</td><td>The maximum number of intermediate results to intersect indexes when querying by multiple single index properties.</td></tr><tr><td>query.ramtable_edges_capacity</td><td>20000000</td><td>The maximum number of edges in ramtable, include OUT and IN edges.</td></tr><tr><td>query.ramtable_enable</td><td>false</td><td>Whether to enable ramtable for query of adjacent edges.</td></tr><tr><td>query.ramtable_vertices_capacity</td><td>10000000</td><td>The maximum number of vertices in ramtable, generally the largest vertex id is used as capacity.</td></tr><tr><td>query.optimize_aggregate_by_index</td><td>false</td><td>Whether to optimize aggregate query(like count) by index.</td></tr><tr><td>oltp.concurrent_depth</td><td>10</td><td>The min depth to enable concurrent oltp algorithm.</td></tr><tr><td>oltp.concurrent_threads</td><td>10</td><td>Thread number to concurrently execute oltp algorithm.</td></tr><tr><td>oltp.collection_type</td><td>EC</td><td>The implementation type of collections used in oltp algorithm.</td></tr><tr><td>rate_limit.read</td><td>0</td><td>The max rate(times/s) to execute query of vertices/edges.</td></tr><tr><td>rate_limit.write</td><td>0</td><td>The max rate(items/s) to add/update/delete vertices/edges.</td></tr><tr><td>task.wait_timeout</td><td>10</td><td>Timeout in seconds for waiting for the task to complete,such as when truncating or clearing the backend.</td></tr><tr><td>task.input_size_limit</td><td>16777216</td><td>The job input size limit in bytes.</td></tr><tr><td>task.result_size_limit</td><td>16777216</td><td>The job result size limit in bytes.</td></tr><tr><td>task.sync_deletion</td><td>false</td><td>Whether to delete schema or expired data synchronously.</td></tr><tr><td>task.ttl_delete_batch</td><td>1</td><td>The batch size used to delete expired data.</td></tr><tr><td>computer.config</td><td>/conf/computer.yaml</td><td>The config file path of computer job.</td></tr><tr><td>search.text_analyzer</td><td>ikanalyzer</td><td>Choose a text analyzer for searching the vertex/edge properties, available type are [word, ansj, hanlp, smartcn, jieba, jcseg, mmseg4j, ikanalyzer]. if use &lsquo;ikanalyzer&rsquo;, need download jar from &lsquo;<a href="https://github.com/apache/hugegraph-doc/raw/ik_binary/dist/server/ikanalyzer-2012_u6.jar'">https://github.com/apache/hugegraph-doc/raw/ik_binary/dist/server/ikanalyzer-2012_u6.jar'</a> to lib directory</td></tr><tr><td>search.text_analyzer_mode</td><td>smart</td><td>Specify the mode for the text analyzer, the available mode of analyzer are {word: [MaximumMatching, ReverseMaximumMatching, MinimumMatching, ReverseMinimumMatching, BidirectionalMaximumMatching, BidirectionalMinimumMatching, BidirectionalMaximumMinimumMatching, FullSegmentation, MinimalWordCount, MaxNgramScore, PureEnglish], ansj: [BaseAnalysis, IndexAnalysis, ToAnalysis, NlpAnalysis], hanlp: [standard, nlp, index, nShort, shortest, speed], smartcn: [], jieba: [SEARCH, INDEX], jcseg: [Simple, Complex], mmseg4j: [Simple, Complex, MaxWord], ikanalyzer: [smart, max_word]}.</td></tr><tr><td>snowflake.datacenter_id</td><td>0</td><td>The datacenter id of snowflake id generator.</td></tr><tr><td>snowflake.force_string</td><td>false</td><td>Whether to force the snowflake long id to be a string.</td></tr><tr><td>snowflake.worker_id</td><td>0</td><td>The worker id of snowflake id generator.</td></tr><tr><td>raft.mode</td><td>false</td><td>Whether the backend storage works in raft mode.</td></tr><tr><td>raft.safe_read</td><td>false</td><td>Whether to use linearly consistent read.</td></tr><tr><td>raft.use_snapshot</td><td>false</td><td>Whether to use snapshot.</td></tr><tr><td>raft.endpoint</td><td>127.0.0.1:8281</td><td>The peerid of current raft node.</td></tr><tr><td>raft.group_peers</td><td>127.0.0.1:8281,127.0.0.1:8282,127.0.0.1:8283</td><td>The peers of current raft group.</td></tr><tr><td>raft.path</td><td>./raft-log</td><td>The log path of current raft node.</td></tr><tr><td>raft.use_replicator_pipeline</td><td>true</td><td>Whether to use replicator line, when turned on it multiple logs can be sent in parallel, and the next log doesn&rsquo;t have to wait for the ack message of the current log to be sent.</td></tr><tr><td>raft.election_timeout</td><td>10000</td><td>Timeout in milliseconds to launch a round of election.</td></tr><tr><td>raft.snapshot_interval</td><td>3600</td><td>The interval in seconds to trigger snapshot save.</td></tr><tr><td>raft.backend_threads</td><td>current CPU v-cores</td><td>The thread number used to apply task to backend.</td></tr><tr><td>raft.read_index_threads</td><td>8</td><td>The thread number used to execute reading index.</td></tr><tr><td>raft.apply_batch</td><td>1</td><td>The apply batch size to trigger disruptor event handler.</td></tr><tr><td>raft.queue_size</td><td>16384</td><td>The disruptor buffers size for jraft RaftNode, StateMachine and LogManager.</td></tr><tr><td>raft.queue_publish_timeout</td><td>60</td><td>The timeout in second when publish event into disruptor.</td></tr><tr><td>raft.rpc_threads</td><td>80</td><td>The rpc threads for jraft RPC layer.</td></tr><tr><td>raft.rpc_connect_timeout</td><td>5000</td><td>The rpc connect timeout for jraft rpc.</td></tr><tr><td>raft.rpc_timeout</td><td>60000</td><td>The rpc timeout for jraft rpc.</td></tr><tr><td>raft.rpc_buf_low_water_mark</td><td>10485760</td><td>The ChannelOutboundBuffer&rsquo;s low water mark of netty, when buffer size less than this size, the method ChannelOutboundBuffer.isWritable() will return true, it means that low downstream pressure or good network.</td></tr><tr><td>raft.rpc_buf_high_water_mark</td><td>20971520</td><td>The ChannelOutboundBuffer&rsquo;s high water mark of netty, only when buffer size exceed this size, the method ChannelOutboundBuffer.isWritable() will return false, it means that the downstream pressure is too great to process the request or network is very congestion, upstream needs to limit rate at this time.</td></tr><tr><td>raft.read_strategy</td><td>ReadOnlyLeaseBased</td><td>The linearizability of read strategy.</td></tr></tbody></table><h3 id=rpc-server-config-options>RPC server Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>rpc.client_connect_timeout</td><td>20</td><td>The timeout(in seconds) of rpc client connect to rpc server.</td></tr><tr><td>rpc.client_load_balancer</td><td>consistentHash</td><td>The rpc client uses a load-balancing algorithm to access multiple rpc servers in one cluster. Default value is &lsquo;consistentHash&rsquo;, means forwarding by request parameters.</td></tr><tr><td>rpc.client_read_timeout</td><td>40</td><td>The timeout(in seconds) of rpc client read from rpc server.</td></tr><tr><td>rpc.client_reconnect_period</td><td>10</td><td>The period(in seconds) of rpc client reconnect to rpc server.</td></tr><tr><td>rpc.client_retries</td><td>3</td><td>Failed retry number of rpc client calls to rpc server.</td></tr><tr><td>rpc.config_order</td><td>999</td><td>Sofa rpc configuration file loading order, the larger the more later loading.</td></tr><tr><td>rpc.logger_impl</td><td>com.alipay.sofa.rpc.log.SLF4JLoggerImpl</td><td>Sofa rpc log implementation class.</td></tr><tr><td>rpc.protocol</td><td>bolt</td><td>Rpc communication protocol, client and server need to be specified the same value.</td></tr><tr><td>rpc.remote_url</td><td></td><td>The remote urls of rpc peers, it can be set to multiple addresses, which are concat by &lsquo;,&rsquo;, empty value means not enabled.</td></tr><tr><td>rpc.server_adaptive_port</td><td>false</td><td>Whether the bound port is adaptive, if it&rsquo;s enabled, when the port is in use, automatically +1 to detect the next available port. Note that this process is not atomic, so there may still be port conflicts.</td></tr><tr><td>rpc.server_host</td><td></td><td>The hosts/ips bound by rpc server to provide services, empty value means not enabled.</td></tr><tr><td>rpc.server_port</td><td>8090</td><td>The port bound by rpc server to provide services.</td></tr><tr><td>rpc.server_timeout</td><td>30</td><td>The timeout(in seconds) of rpc server execution.</td></tr></tbody></table><h3 id=cassandra-backend-config-options>Cassandra Backend Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>backend</td><td></td><td>Must be set to <code>cassandra</code>.</td></tr><tr><td>serializer</td><td></td><td>Must be set to <code>cassandra</code>.</td></tr><tr><td>cassandra.host</td><td>localhost</td><td>The seeds hostname or ip address of cassandra cluster.</td></tr><tr><td>cassandra.port</td><td>9042</td><td>The seeds port address of cassandra cluster.</td></tr><tr><td>cassandra.connect_timeout</td><td>5</td><td>The cassandra driver connect server timeout(seconds).</td></tr><tr><td>cassandra.read_timeout</td><td>20</td><td>The cassandra driver read from server timeout(seconds).</td></tr><tr><td>cassandra.keyspace.strategy</td><td>SimpleStrategy</td><td>The replication strategy of keyspace, valid value is SimpleStrategy or NetworkTopologyStrategy.</td></tr><tr><td>cassandra.keyspace.replication</td><td>[3]</td><td>The keyspace replication factor of SimpleStrategy, like &lsquo;[3]&rsquo;.Or replicas in each datacenter of NetworkTopologyStrategy, like &lsquo;[dc1:2,dc2:1]&rsquo;.</td></tr><tr><td>cassandra.username</td><td></td><td>The username to use to login to cassandra cluster.</td></tr><tr><td>cassandra.password</td><td></td><td>The password corresponding to cassandra.username.</td></tr><tr><td>cassandra.compression_type</td><td>none</td><td>The compression algorithm of cassandra transport: none/snappy/lz4.</td></tr><tr><td>cassandra.jmx_port=7199</td><td>7199</td><td>The port of JMX API service for cassandra.</td></tr><tr><td>cassandra.aggregation_timeout</td><td>43200</td><td>The timeout in seconds of waiting for aggregation.</td></tr></tbody></table><h3 id=scylladb-backend-config-options>ScyllaDB Backend Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>backend</td><td></td><td>Must be set to <code>scylladb</code>.</td></tr><tr><td>serializer</td><td></td><td>Must be set to <code>scylladb</code>.</td></tr></tbody></table><p>Other options are consistent with the Cassandra backend.</p><h3 id=rocksdb-backend-config-options>RocksDB Backend Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>backend</td><td></td><td>Must be set to <code>rocksdb</code>.</td></tr><tr><td>serializer</td><td></td><td>Must be set to <code>binary</code>.</td></tr><tr><td>rocksdb.data_disks</td><td>[]</td><td>The optimized disks for storing data of RocksDB. The format of each element: <code>STORE/TABLE: /path/disk</code>.Allowed keys are [g/vertex, g/edge_out, g/edge_in, g/vertex_label_index, g/edge_label_index, g/range_int_index, g/range_float_index, g/range_long_index, g/range_double_index, g/secondary_index, g/search_index, g/shard_index, g/unique_index, g/olap]</td></tr><tr><td>rocksdb.data_path</td><td>rocksdb-data/data</td><td>The path for storing data of RocksDB.</td></tr><tr><td>rocksdb.wal_path</td><td>rocksdb-data/wal</td><td>The path for storing WAL of RocksDB.</td></tr><tr><td>rocksdb.allow_mmap_reads</td><td>false</td><td>Allow the OS to mmap file for reading sst tables.</td></tr><tr><td>rocksdb.allow_mmap_writes</td><td>false</td><td>Allow the OS to mmap file for writing.</td></tr><tr><td>rocksdb.block_cache_capacity</td><td>8388608</td><td>The amount of block cache in bytes that will be used by RocksDB, 0 means no block cache.</td></tr><tr><td>rocksdb.bloom_filter_bits_per_key</td><td>-1</td><td>The bits per key in bloom filter, a good value is 10, which yields a filter with ~ 1% false positive rate, -1 means no bloom filter.</td></tr><tr><td>rocksdb.bloom_filter_block_based_mode</td><td>false</td><td>Use block based filter rather than full filter.</td></tr><tr><td>rocksdb.bloom_filter_whole_key_filtering</td><td>true</td><td>True if place whole keys in the bloom filter, else place the prefix of keys.</td></tr><tr><td>rocksdb.bottommost_compression</td><td>NO_COMPRESSION</td><td>The compression algorithm for the bottommost level of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd.</td></tr><tr><td>rocksdb.bulkload_mode</td><td>false</td><td>Switch to the mode to bulk load data into RocksDB.</td></tr><tr><td>rocksdb.cache_index_and_filter_blocks</td><td>false</td><td>Indicating if we&rsquo;d put index/filter blocks to the block cache.</td></tr><tr><td>rocksdb.compaction_style</td><td>LEVEL</td><td>Set compaction style for RocksDB: LEVEL/UNIVERSAL/FIFO.</td></tr><tr><td>rocksdb.compression</td><td>SNAPPY_COMPRESSION</td><td>The compression algorithm for compressing blocks of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd.</td></tr><tr><td>rocksdb.compression_per_level</td><td>[NO_COMPRESSION, NO_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION, SNAPPY_COMPRESSION]</td><td>The compression algorithms for different levels of RocksDB, allowed values are none/snappy/z/bzip2/lz4/lz4hc/xpress/zstd.</td></tr><tr><td>rocksdb.delayed_write_rate</td><td>16777216</td><td>The rate limit in bytes/s of user write requests when need to slow down if the compaction gets behind.</td></tr><tr><td>rocksdb.log_level</td><td>INFO</td><td>The info log level of RocksDB.</td></tr><tr><td>rocksdb.max_background_jobs</td><td>8</td><td>Maximum number of concurrent background jobs, including flushes and compactions.</td></tr><tr><td>rocksdb.level_compaction_dynamic_level_bytes</td><td>false</td><td>Whether to enable level_compaction_dynamic_level_bytes, if it&rsquo;s enabled we give max_bytes_for_level_multiplier a priority against max_bytes_for_level_base, the bytes of base level is dynamic for a more predictable LSM tree, it is useful to limit worse case space amplification. Turning this feature on/off for an existing DB can cause unexpected LSM tree structure so it&rsquo;s not recommended.</td></tr><tr><td>rocksdb.max_bytes_for_level_base</td><td>536870912</td><td>The upper-bound of the total size of level-1 files in bytes.</td></tr><tr><td>rocksdb.max_bytes_for_level_multiplier</td><td>10.0</td><td>The ratio between the total size of level (L+1) files and the total size of level L files for all L.</td></tr><tr><td>rocksdb.max_open_files</td><td>-1</td><td>The maximum number of open files that can be cached by RocksDB, -1 means no limit.</td></tr><tr><td>rocksdb.max_subcompactions</td><td>4</td><td>The value represents the maximum number of threads per compaction job.</td></tr><tr><td>rocksdb.max_write_buffer_number</td><td>6</td><td>The maximum number of write buffers that are built up in memory.</td></tr><tr><td>rocksdb.max_write_buffer_number_to_maintain</td><td>0</td><td>The total maximum number of write buffers to maintain in memory.</td></tr><tr><td>rocksdb.min_write_buffer_number_to_merge</td><td>2</td><td>The minimum number of write buffers that will be merged together.</td></tr><tr><td>rocksdb.num_levels</td><td>7</td><td>Set the number of levels for this database.</td></tr><tr><td>rocksdb.optimize_filters_for_hits</td><td>false</td><td>This flag allows us to not store filters for the last level.</td></tr><tr><td>rocksdb.optimize_mode</td><td>true</td><td>Optimize for heavy workloads and big datasets.</td></tr><tr><td>rocksdb.pin_l0_filter_and_index_blocks_in_cache</td><td>false</td><td>Indicating if we&rsquo;d put index/filter blocks to the block cache.</td></tr><tr><td>rocksdb.sst_path</td><td></td><td>The path for ingesting SST file into RocksDB.</td></tr><tr><td>rocksdb.target_file_size_base</td><td>67108864</td><td>The target file size for compaction in bytes.</td></tr><tr><td>rocksdb.target_file_size_multiplier</td><td>1</td><td>The size ratio between a level L file and a level (L+1) file.</td></tr><tr><td>rocksdb.use_direct_io_for_flush_and_compaction</td><td>false</td><td>Enable the OS to use direct read/writes in flush and compaction.</td></tr><tr><td>rocksdb.use_direct_reads</td><td>false</td><td>Enable the OS to use direct I/O for reading sst tables.</td></tr><tr><td>rocksdb.write_buffer_size</td><td>134217728</td><td>Amount of data in bytes to build up in memory.</td></tr><tr><td>rocksdb.max_manifest_file_size</td><td>104857600</td><td>The max size of manifest file in bytes.</td></tr><tr><td>rocksdb.skip_stats_update_on_db_open</td><td>false</td><td>Whether to skip statistics update when opening the database, setting this flag true allows us to not update statistics.</td></tr><tr><td>rocksdb.max_file_opening_threads</td><td>16</td><td>The max number of threads used to open files.</td></tr><tr><td>rocksdb.max_total_wal_size</td><td>0</td><td>Total size of WAL files in bytes. Once WALs exceed this size, we will start forcing the flush of column families related, 0 means no limit.</td></tr><tr><td>rocksdb.db_write_buffer_size</td><td>0</td><td>Total size of write buffers in bytes across all column families, 0 means no limit.</td></tr><tr><td>rocksdb.delete_obsolete_files_period</td><td>21600</td><td>The periodicity in seconds when obsolete files get deleted, 0 means always do full purge.</td></tr><tr><td>rocksdb.hard_pending_compaction_bytes_limit</td><td>274877906944</td><td>The hard limit to impose on pending compaction in bytes.</td></tr><tr><td>rocksdb.level0_file_num_compaction_trigger</td><td>2</td><td>Number of files to trigger level-0 compaction.</td></tr><tr><td>rocksdb.level0_slowdown_writes_trigger</td><td>20</td><td>Soft limit on number of level-0 files for slowing down writes.</td></tr><tr><td>rocksdb.level0_stop_writes_trigger</td><td>36</td><td>Hard limit on number of level-0 files for stopping writes.</td></tr><tr><td>rocksdb.soft_pending_compaction_bytes_limit</td><td>68719476736</td><td>The soft limit to impose on pending compaction in bytes.</td></tr></tbody></table><h3 id=hbase-backend-config-options>HBase Backend Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>backend</td><td></td><td>Must be set to <code>hbase</code>.</td></tr><tr><td>serializer</td><td></td><td>Must be set to <code>hbase</code>.</td></tr><tr><td>hbase.hosts</td><td>localhost</td><td>The hostnames or ip addresses of HBase zookeeper, separated with commas.</td></tr><tr><td>hbase.port</td><td>2181</td><td>The port address of HBase zookeeper.</td></tr><tr><td>hbase.threads_max</td><td>64</td><td>The max threads num of hbase connections.</td></tr><tr><td>hbase.znode_parent</td><td>/hbase</td><td>The znode parent path of HBase zookeeper.</td></tr><tr><td>hbase.zk_retry</td><td>3</td><td>The recovery retry times of HBase zookeeper.</td></tr><tr><td>hbase.aggregation_timeout</td><td>43200</td><td>The timeout in seconds of waiting for aggregation.</td></tr><tr><td>hbase.kerberos_enable</td><td>false</td><td>Is Kerberos authentication enabled for HBase.</td></tr><tr><td>hbase.kerberos_keytab</td><td></td><td>The HBase&rsquo;s key tab file for kerberos authentication.</td></tr><tr><td>hbase.kerberos_principal</td><td></td><td>The HBase&rsquo;s principal for kerberos authentication.</td></tr><tr><td>hbase.krb5_conf</td><td>etc/krb5.conf</td><td>Kerberos configuration file, including KDC IP, default realm, etc.</td></tr><tr><td>hbase.hbase_site</td><td>/etc/hbase/conf/hbase-site.xml</td><td>The HBase&rsquo;s configuration file</td></tr><tr><td>hbase.enable_partition</td><td>true</td><td>Is pre-split partitions enabled for HBase.</td></tr><tr><td>hbase.vertex_partitions</td><td>10</td><td>The number of partitions of the HBase vertex table.</td></tr><tr><td>hbase.edge_partitions</td><td>30</td><td>The number of partitions of the HBase edge table.</td></tr></tbody></table><h3 id=mysql--postgresql-backend-config-options>MySQL & PostgreSQL Backend Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>backend</td><td></td><td>Must be set to <code>mysql</code>.</td></tr><tr><td>serializer</td><td></td><td>Must be set to <code>mysql</code>.</td></tr><tr><td>jdbc.driver</td><td>com.mysql.jdbc.Driver</td><td>The JDBC driver class to connect database.</td></tr><tr><td>jdbc.url</td><td>jdbc:mysql://127.0.0.1:3306</td><td>The url of database in JDBC format.</td></tr><tr><td>jdbc.username</td><td>root</td><td>The username to login database.</td></tr><tr><td>jdbc.password</td><td>******</td><td>The password corresponding to jdbc.username.</td></tr><tr><td>jdbc.ssl_mode</td><td>false</td><td>The SSL mode of connections with database.</td></tr><tr><td>jdbc.reconnect_interval</td><td>3</td><td>The interval(seconds) between reconnections when the database connection fails.</td></tr><tr><td>jdbc.reconnect_max_times</td><td>3</td><td>The reconnect times when the database connection fails.</td></tr><tr><td>jdbc.storage_engine</td><td>InnoDB</td><td>The storage engine of backend store database, like InnoDB/MyISAM/RocksDB for MySQL.</td></tr><tr><td>jdbc.postgresql.connect_database</td><td>template1</td><td>The database used to connect when init store, drop store or check store exist.</td></tr></tbody></table><h3 id=postgresql-backend-config-options>PostgreSQL Backend Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>backend</td><td></td><td>Must be set to <code>postgresql</code>.</td></tr><tr><td>serializer</td><td></td><td>Must be set to <code>postgresql</code>.</td></tr></tbody></table><p>Other options are consistent with the MySQL backend.</p><blockquote><p>The driver and url of the PostgreSQL backend should be set to:</p><ul><li><code>jdbc.driver=org.postgresql.Driver</code></li><li><code>jdbc.url=jdbc:postgresql://localhost:5432/</code></li></ul></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-7d189549d4201521c83e0d93a2474a2d>4.3 - Built-in User Authentication and Authorization Configuration and Usage in HugeGraph</h1><h3 id=overview>Overview</h3><p>To facilitate authentication usage in different user scenarios, HugeGraph currently provides built-in authorization <code>StandardAuthenticator</code> mode,
which supports multi-user authentication and fine-grained access control. It adopts a 4-layer design based on &ldquo;User-UserGroup-Operation-Resource&rdquo; to
flexibly control user roles and permissions (supports multiple GraphServers).</p><p>Some key designs of the <code>StandardAuthenticator</code> mode include:</p><ul><li>During initialization, a super administrator (<code>admin</code>) user is created. Subsequently, other users can be created by the super administrator. Once newly created users are assigned sufficient permissions, they can create or manage more users.</li><li>It supports dynamic creation of users, user groups, and resources, as well as dynamic allocation or revocation of permissions.</li><li>Users can belong to one or multiple user groups. Each user group can have permissions to operate on any number of resources. The types of operations include read, write, delete, execute, and others.</li><li>&ldquo;Resource&rdquo; describes the data in the graph database, such as vertices that meet certain criteria. Each resource consists of three elements: <code>type</code>, <code>label</code>, and <code>properties</code>. There are 18 types in total, with the ability to combine any label and properties. The internal condition of a resource is an AND relationship, while the condition between multiple resources is an OR relationship.</li></ul><p>Here is an example to illustrate:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Scenario: A user only has data read permission for the Beijing area
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>user</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>name</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#000>xx</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>belong</span><span style=color:#ce5c00;font-weight:700>-&gt;</span> <span style=color:#000>group</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>name</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#000>xx</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>access</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>read</span><span style=color:#ce5c00;font-weight:700>)-&gt;</span> <span style=color:#000>target</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#000>graph1</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>resource</span><span style=color:#ce5c00;font-weight:700>={</span><span style=color:#000>label</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000>person</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>city</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000>Beijing</span><span style=color:#ce5c00;font-weight:700>})</span>
</span></span></code></pre></div><h3 id=configure-user-authentication>Configure User Authentication</h3><p>By default, HugeGraph does <strong>not enable</strong> user authentication, and it needs to be enabled by
modifying the configuration file (Note: If used in a production environment or over the internet,
please use a <strong>Java11</strong> version and enable <strong>auth-system</strong> to avoid security risks.)"</p><p>You need to modify the configuration file to enable this feature. HugeGraph provides built-in authentication mode: <code>StandardAuthenticator</code>. This mode supports multi-user authentication and fine-grained permission control. Additionally, developers can implement their own <code>HugeAuthenticator</code> interface to integrate with their existing authentication systems.</p><p>HugeGraph authentication modes adopt <a href=https://en.wikipedia.org/wiki/Basic_access_authentication>HTTP Basic Authentication</a>. In simple terms, when sending an HTTP request, you need to set the <code>Authentication</code> header to <code>Basic</code> and provide the corresponding username and password. The corresponding HTTP plaintext format is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-http data-lang=http><span style=display:flex><span><span style=color:#a40000>GET http://localhost:8080/graphs/hugegraph/schema/vertexlabels
</span></span></span><span style=display:flex><span><span style=color:#a40000>Authorization: Basic admin xxxx
</span></span></span></code></pre></div><h4 id=standardauthenticator-mode>StandardAuthenticator Mode</h4><p>The <code>StandardAuthenticator</code> mode supports user authentication and permission control by storing user information in the database backend. This
implementation authenticates users based on their names and passwords (encrypted) stored in the database and controls user permissions based on their
roles. Below is the specific configuration process (requires service restart):</p><p>Configure the <code>authenticator</code> and its <code>rest-server</code> file path in the <code>gremlin-server.yaml</code> configuration file:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#204a87;font-weight:700>authentication</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>authenticator</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.auth.StandardAuthenticator,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>authenticationHandler</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.hugegraph.auth.WsAndHttpBasicAuthHandler,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>config</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#204a87;font-weight:700>tokens</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>conf/rest-server.properties}</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><p>Configure the <code>authenticator</code> and <code>graph_store</code> information in the <code>rest-server.properties</code> configuration file:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>auth.authenticator=org.apache.hugegraph.auth.StandardAuthenticator
</span></span><span style=display:flex><span>auth.graph_store=hugegraph
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># Auth Client Config
</span></span><span style=display:flex><span># If GraphServer and AuthServer are deployed separately, you also need to specify the following configuration. Fill in the IP:RPC port of AuthServer.
</span></span><span style=display:flex><span># auth.remote_url=127.0.0.1:8899,127.0.0.1:8898,127.0.0.1:8897
</span></span></code></pre></div><p>In the above configuration, the <code>graph_store</code> option specifies which graph to use for storing user information. If there are multiple graphs, you can choose any of them.</p><p>In the <code>hugegraph{n}.properties</code> configuration file, configure the <code>gremlin.graph</code> information:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
</span></span></code></pre></div><p>For detailed API calls and explanations regarding permissions, please refer to the <a href=/docs/clients/restful-api/auth>Authentication-API</a> documentation.</p><h3 id=custom-user-authentication-system>Custom User Authentication System</h3><p>If you need to support a more flexible user system, you can customize the authenticator for extension.
Simply implement the <code>org.apache.hugegraph.auth.HugeAuthenticator</code> interface with your custom authenticator,
and then modify the <code>authenticator</code> configuration item in the configuration file to point to your implementation.</p><h3 id=switching-authentication-mode>Switching authentication mode</h3><p>After the authentication configuration completed, enter the <strong>admin password</strong> on the <strong>command line</strong> when executing <code>init store.sh</code> for the first time. (For non-Docker mode)</p><p>If deployed based on Docker image or if HugeGraph has already been initialized and needs to be converted to authentication mode,
relevant graph data needs to be deleted and HugeGraph needs to be restarted. If there is already business data in the diagram,
it is temporarily <strong>not possible</strong> to directly convert the authentication mode (version&lt;=1.2.0 )</p><blockquote><p>Improvements for this feature have been included in the latest release (available in latest docker image), please refer to <a href=https://github.com/apache/incubator-hugegraph/pull/2411>PR 2411</a>. Seamless switching is now available.</p></blockquote><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># stop the hugeGraph firstly</span>
</span></span><span style=display:flex><span>bin/stop-hugegraph.sh
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># delete the store data (here we use the default path for rocksdb)</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># there is no need to delete in the latest version (fixed in https://github.com/apache/incubator-hugegraph/pull/2411)</span>
</span></span><span style=display:flex><span>rm -rf rocksdb-data/
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># init store again</span>
</span></span><span style=display:flex><span>bin/init-store.sh
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># start hugeGraph again</span>
</span></span><span style=display:flex><span>bin/start-hugegraph.sh
</span></span></code></pre></div><h3 id=use-docker-to-enble-authentication-mode>Use docker to enble authentication mode</h3><p>For versions of the hugegraph/hugegraph image equal to or greater than 1.2.0, you can enable authentication mode while starting the Docker image.</p><p>The steps are as follows:</p><h4 id=1-use-docker-run>1. Use docker run</h4><p>To enable authentication mode, add the environment variable <code>PASSWORD=123456</code> (you can freely set the password) in the <code>docker run</code> command:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>docker run -itd -e <span style=color:#000>PASSWORD</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#0000cf;font-weight:700>123456</span> --name<span style=color:#ce5c00;font-weight:700>=</span>server -p 8080:8080 hugegraph/hugegraph:1.2.0
</span></span></code></pre></div><h4 id=2-use-docker-compose>2. Use docker-compose</h4><p>Use <code>docker-compose</code> and set he environment variable <code>PASSWORD=123456</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#204a87;font-weight:700>version</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#4e9a06>&#39;3&#39;</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>services</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>server</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>image</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph/hugegraph:1.2.0</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>container_name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>server</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ports</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#0000cf;font-weight:700>8080</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8080</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>environment</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>- <span style=color:#000>PASSWORD=123456</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><h4 id=3-enter-the-container-to-enable-authentication-mode>3. Enter the container to enable authentication mode</h4><p>Enter the container first:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>docker <span style=color:#204a87>exec</span> -it server bash
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Modify the config quickly, the modified file are save in the conf-bak folder</span>
</span></span><span style=display:flex><span>bin/enable-auth.sh
</span></span></code></pre></div><p>Then follow <a href=#switching-authentication-mode>Switching authentication mode</a></p></div><div class=td-content style=page-break-before:always><h1 id=pg-7e400260398a18d0be72b1fe5a73f419>4.4 - Configuring HugeGraphServer to Use HTTPS Protocol</h1><h3 id=overview>Overview</h3><p>By default, HugeGraphServer uses the HTTP protocol. However, if you have security requirements for your requests, you can configure it to use HTTPS.</p><h3 id=server-configuration>Server Configuration</h3><p>Modify the <code>conf/rest-server.properties</code> configuration file and change the schema part of <code>restserver.url</code> to <code>https</code>.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-ini data-lang=ini><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Set the protocol to HTTPS</span>
</span></span><span style=display:flex><span><span style=color:#c4a000>restserver.url</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>https://127.0.0.1:8080</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Server keystore file path. This default value is automatically effective when using HTTPS, and you can modify it as needed.</span>
</span></span><span style=display:flex><span><span style=color:#c4a000>ssl.keystore_file</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>conf/hugegraph-server.keystore</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Server keystore file password. This default value is automatically effective when using HTTPS, and you can modify it as needed.</span>
</span></span><span style=display:flex><span><span style=color:#c4a000>ssl.keystore_password</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>******</span>
</span></span></code></pre></div><p>The server&rsquo;s <code>conf</code> directory already includes a keystore file named <code>hugegraph-server.keystore</code>, and the password for this file is <code>hugegraph</code>. These are the default values when enabling the HTTPS protocol. Users can generate their own keystore file and password, and then modify the values of <code>ssl.keystore_file</code> and <code>ssl.keystore_password</code>.</p><h3 id=client-configuration>Client Configuration</h3><h4 id=using-https-in-hugegraph-client>Using HTTPS in HugeGraph-Client</h4><p>When constructing a HugeClient, pass the HTTPS-related configurations. Here&rsquo;s an example in Java:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>String</span> <span style=color:#000>url</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#4e9a06>&#34;https://localhost:8080&#34;</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#000>String</span> <span style=color:#000>graphName</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#000>HugeClientBuilder</span> <span style=color:#000>builder</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>HugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>builder</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>url</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>graphName</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Client keystore file path
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>String</span> <span style=color:#000>trustStoreFilePath</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#4e9a06>&#34;hugegraph.truststore&#34;</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Client keystore password
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>String</span> <span style=color:#000>trustStorePassword</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#4e9a06>&#34;******&#34;</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>configSSL</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>trustStoreFilePath</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>trustStorePassword</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span><span style=color:#000>HugeClient</span> <span style=color:#000>hugeClient</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>builder</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>build</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><blockquote><p>Note: Before version 1.9.0, HugeGraph-Client was created directly using the <code>new</code> keyword and did not support the HTTPS protocol. Starting from version 1.9.0, it changed to use the builder pattern and supports configuring the HTTPS protocol.</p></blockquote><h4 id=using-https-in-hugegraph-loader>Using HTTPS in HugeGraph-Loader</h4><p>When starting an import task, add the following options in the command line:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># HTTPS</span>
</span></span><span style=display:flex><span>--protocol https
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Client certificate file path. When specifying --protocol as https, the default value conf/hugegraph.truststore is automatically used, and you can modify it as needed.</span>
</span></span><span style=display:flex><span>--trust-store-file <span style=color:#ce5c00;font-weight:700>{</span>file<span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Client certificate file password. When specifying --protocol as https, the default value hugegraph is automatically used, and you can modify it as needed.</span>
</span></span><span style=display:flex><span>--trust-store-password <span style=color:#ce5c00;font-weight:700>{</span>password<span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><p>Under the <code>conf</code> directory of hugegraph-loader, there is already a default client certificate file named <code>hugegraph.truststore</code>, and its password is <code>hugegraph</code>.</p><h4 id=using-https-in-hugegraph-tools>Using HTTPS in HugeGraph-Tools</h4><p>When executing commands, add the following options in the command line:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Client certificate file path. When using the HTTPS protocol in the URL, the default value conf/hugegraph.truststore is automatically used, and you can modify it as needed.</span>
</span></span><span style=display:flex><span>--trust-store-file <span style=color:#ce5c00;font-weight:700>{</span>file<span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Client certificate file password. When using the HTTPS protocol in the URL, the default value hugegraph is automatically used, and you can modify it as needed.</span>
</span></span><span style=display:flex><span>--trust-store-password <span style=color:#ce5c00;font-weight:700>{</span>password<span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># When executing migration commands and using the --target-url with the HTTPS protocol, the default value conf/hugegraph.truststore is automatically used, and you can modify it as needed.</span>
</span></span><span style=display:flex><span>--target-trust-store-file <span style=color:#ce5c00;font-weight:700>{</span>target-file<span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># When executing migration commands and using the --target-url with the HTTPS protocol, the default value hugegraph is automatically used, and you can modify it as needed.</span>
</span></span><span style=display:flex><span>--target-trust-store-password <span style=color:#ce5c00;font-weight:700>{</span>target-password<span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><p>Under the <code>conf</code> directory of hugegraph-tools, there is already a default client certificate file named <code>hugegraph.truststore</code>, and its password is <code>hugegraph</code>.</p><h3 id=how-to-generate-certificate-files>How to Generate Certificate Files</h3><p>This section provides an example of generating certificates. If the default certificate is sufficient or if you already know how to generate certificates, you can skip this section.</p><h4 id=server>Server</h4><ol><li>Generate the server&rsquo;s private key and import it into the server&rsquo;s keystore file. The <code>server.keystore</code> is for the server&rsquo;s use and contains its private key.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>keytool -genkey -alias serverkey -keyalg RSA -keystore server.keystore
</span></span></code></pre></div><p>During the process, fill in the description information according to your requirements. The description information for the default certificate is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>First and Last Name: hugegraph
</span></span><span style=display:flex><span>Organizational Unit Name: hugegraph
</span></span><span style=display:flex><span>Organization Name: hugegraph
</span></span><span style=display:flex><span>City or Locality Name: BJ
</span></span><span style=display:flex><span>State or Province Name: BJ
</span></span><span style=display:flex><span>Country Code: CN
</span></span></code></pre></div><ol start=2><li>Export the server certificate based on the server&rsquo;s private key.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>keytool -export -alias serverkey -keystore server.keystore -file server.crt
</span></span></code></pre></div><p><code>server.crt</code> is the server&rsquo;s certificate.</p><h4 id=client>Client</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>keytool -import -alias serverkey -file server.crt -keystore client.truststore
</span></span></code></pre></div><p><code>client.truststore</code> is for the client&rsquo;s use and contains the trusted certificate.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-b22c66aa61d3c6e047af8286d3b5f445>4.5 - HugeGraph-Computer Config</h1><h3 id=computer-config-options>Computer Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>algorithm.message_class</td><td>org.apache.hugegraph.computer.core.config.Null</td><td>The class of message passed when compute vertex.</td></tr><tr><td>algorithm.params_class</td><td>org.apache.hugegraph.computer.core.config.Null</td><td>The class used to transfer algorithms&rsquo; parameters before algorithm been run.</td></tr><tr><td>algorithm.result_class</td><td>org.apache.hugegraph.computer.core.config.Null</td><td>The class of vertex&rsquo;s value, the instance is used to store computation result for the vertex.</td></tr><tr><td>allocator.max_vertices_per_thread</td><td>10000</td><td>Maximum number of vertices per thread processed in each memory allocator</td></tr><tr><td>bsp.etcd_endpoints</td><td>http://localhost:2379</td><td>The end points to access etcd.</td></tr><tr><td>bsp.log_interval</td><td>30000</td><td>The log interval(in ms) to print the log while waiting bsp event.</td></tr><tr><td>bsp.max_super_step</td><td>10</td><td>The max super step of the algorithm.</td></tr><tr><td>bsp.register_timeout</td><td>300000</td><td>The max timeout to wait for master and works to register.</td></tr><tr><td>bsp.wait_master_timeout</td><td>86400000</td><td>The max timeout(in ms) to wait for master bsp event.</td></tr><tr><td>bsp.wait_workers_timeout</td><td>86400000</td><td>The max timeout to wait for workers bsp event.</td></tr><tr><td>hgkv.max_data_block_size</td><td>65536</td><td>The max byte size of hgkv-file data block.</td></tr><tr><td>hgkv.max_file_size</td><td>2147483648</td><td>The max number of bytes in each hgkv-file.</td></tr><tr><td>hgkv.max_merge_files</td><td>10</td><td>The max number of files to merge at one time.</td></tr><tr><td>hgkv.temp_file_dir</td><td>/tmp/hgkv</td><td>This folder is used to store temporary files, temporary files will be generated during the file merging process.</td></tr><tr><td>hugegraph.name</td><td>hugegraph</td><td>The graph name to load data and write results back.</td></tr><tr><td>hugegraph.url</td><td>http://127.0.0.1:8080</td><td>The hugegraph url to load data and write results back.</td></tr><tr><td>input.edge_direction</td><td>OUT</td><td>The data of the edge in which direction is loaded, when the value is BOTH, the edges in both OUT and IN direction will be loaded.</td></tr><tr><td>input.edge_freq</td><td>MULTIPLE</td><td>The frequency of edges can exist between a pair of vertices, allowed values: [SINGLE, SINGLE_PER_LABEL, MULTIPLE]. SINGLE means that only one edge can exist between a pair of vertices, use sourceId + targetId to identify it; SINGLE_PER_LABEL means that each edge label can exist one edge between a pair of vertices, use sourceId + edgelabel + targetId to identify it; MULTIPLE means that many edge can exist between a pair of vertices, use sourceId + edgelabel + sortValues + targetId to identify it.</td></tr><tr><td>input.filter_class</td><td>org.apache.hugegraph.computer.core.input.filter.DefaultInputFilter</td><td>The class to create input-filter object, input-filter is used to Filter vertex edges according to user needs.</td></tr><tr><td>input.loader_schema_path</td><td></td><td>The schema path of loader input, only takes effect when the input.source_type=loader is enabled</td></tr><tr><td>input.loader_struct_path</td><td></td><td>The struct path of loader input, only takes effect when the input.source_type=loader is enabled</td></tr><tr><td>input.max_edges_in_one_vertex</td><td>200</td><td>The maximum number of adjacent edges allowed to be attached to a vertex, the adjacent edges will be stored and transferred together as a batch unit.</td></tr><tr><td>input.source_type</td><td>hugegraph-server</td><td>The source type to load input data, allowed values: [&lsquo;hugegraph-server&rsquo;, &lsquo;hugegraph-loader&rsquo;], the &lsquo;hugegraph-loader&rsquo; means use hugegraph-loader load data from HDFS or file, if use &lsquo;hugegraph-loader&rsquo; load data then please config &lsquo;input.loader_struct_path&rsquo; and &lsquo;input.loader_schema_path&rsquo;.</td></tr><tr><td>input.split_fetch_timeout</td><td>300</td><td>The timeout in seconds to fetch input splits</td></tr><tr><td>input.split_max_splits</td><td>10000000</td><td>The maximum number of input splits</td></tr><tr><td>input.split_page_size</td><td>500</td><td>The page size for streamed load input split data</td></tr><tr><td>input.split_size</td><td>1048576</td><td>The input split size in bytes</td></tr><tr><td>job.id</td><td>local_0001</td><td>The job id on Yarn cluster or K8s cluster.</td></tr><tr><td>job.partitions_count</td><td>1</td><td>The partitions count for computing one graph algorithm job.</td></tr><tr><td>job.partitions_thread_nums</td><td>4</td><td>The number of threads for partition parallel compute.</td></tr><tr><td>job.workers_count</td><td>1</td><td>The workers count for computing one graph algorithm job.</td></tr><tr><td>master.computation_class</td><td>org.apache.hugegraph.computer.core.master.DefaultMasterComputation</td><td>Master-computation is computation that can determine whether to continue next superstep. It runs at the end of each superstep on master.</td></tr><tr><td>output.batch_size</td><td>500</td><td>The batch size of output</td></tr><tr><td>output.batch_threads</td><td>1</td><td>The threads number used to batch output</td></tr><tr><td>output.hdfs_core_site_path</td><td></td><td>The hdfs core site path.</td></tr><tr><td>output.hdfs_delimiter</td><td>,</td><td>The delimiter of hdfs output.</td></tr><tr><td>output.hdfs_kerberos_enable</td><td>false</td><td>Is Kerberos authentication enabled for Hdfs.</td></tr><tr><td>output.hdfs_kerberos_keytab</td><td></td><td>The Hdfs&rsquo;s key tab file for kerberos authentication.</td></tr><tr><td>output.hdfs_kerberos_principal</td><td></td><td>The Hdfs&rsquo;s principal for kerberos authentication.</td></tr><tr><td>output.hdfs_krb5_conf</td><td>/etc/krb5.conf</td><td>Kerberos configuration file.</td></tr><tr><td>output.hdfs_merge_partitions</td><td>true</td><td>Whether merge output files of multiple partitions.</td></tr><tr><td>output.hdfs_path_prefix</td><td>/hugegraph-computer/results</td><td>The directory of hdfs output result.</td></tr><tr><td>output.hdfs_replication</td><td>3</td><td>The replication number of hdfs.</td></tr><tr><td>output.hdfs_site_path</td><td></td><td>The hdfs site path.</td></tr><tr><td>output.hdfs_url</td><td>hdfs://127.0.0.1:9000</td><td>The hdfs url of output.</td></tr><tr><td>output.hdfs_user</td><td>hadoop</td><td>The hdfs user of output.</td></tr><tr><td>output.output_class</td><td>org.apache.hugegraph.computer.core.output.LogOutput</td><td>The class to output the computation result of each vertex. Be called after iteration computation.</td></tr><tr><td>output.result_name</td><td>value</td><td>The value is assigned dynamically by #name() of instance created by WORKER_COMPUTATION_CLASS.</td></tr><tr><td>output.result_write_type</td><td>OLAP_COMMON</td><td>The result write-type to output to hugegraph, allowed values are: [OLAP_COMMON, OLAP_SECONDARY, OLAP_RANGE].</td></tr><tr><td>output.retry_interval</td><td>10</td><td>The retry interval when output failed</td></tr><tr><td>output.retry_times</td><td>3</td><td>The retry times when output failed</td></tr><tr><td>output.single_threads</td><td>1</td><td>The threads number used to single output</td></tr><tr><td>output.thread_pool_shutdown_timeout</td><td>60</td><td>The timeout seconds of output threads pool shutdown</td></tr><tr><td>output.with_adjacent_edges</td><td>false</td><td>Output the adjacent edges of the vertex or not</td></tr><tr><td>output.with_edge_properties</td><td>false</td><td>Output the properties of the edge or not</td></tr><tr><td>output.with_vertex_properties</td><td>false</td><td>Output the properties of the vertex or not</td></tr><tr><td>sort.thread_nums</td><td>4</td><td>The number of threads performing internal sorting.</td></tr><tr><td>transport.client_connect_timeout</td><td>3000</td><td>The timeout(in ms) of client connect to server.</td></tr><tr><td>transport.client_threads</td><td>4</td><td>The number of transport threads for client.</td></tr><tr><td>transport.close_timeout</td><td>10000</td><td>The timeout(in ms) of close server or close client.</td></tr><tr><td>transport.finish_session_timeout</td><td>0</td><td>The timeout(in ms) to finish session, 0 means using (transport.sync_request_timeout * transport.max_pending_requests).</td></tr><tr><td>transport.heartbeat_interval</td><td>20000</td><td>The minimum interval(in ms) between heartbeats on client side.</td></tr><tr><td>transport.io_mode</td><td>AUTO</td><td>The network IO Mode, either &lsquo;NIO&rsquo;, &lsquo;EPOLL&rsquo;, &lsquo;AUTO&rsquo;, the &lsquo;AUTO&rsquo; means selecting the property mode automatically.</td></tr><tr><td>transport.max_pending_requests</td><td>8</td><td>The max number of client unreceived ack, it will trigger the sending unavailable if the number of unreceived ack >= max_pending_requests.</td></tr><tr><td>transport.max_syn_backlog</td><td>511</td><td>The capacity of SYN queue on server side, 0 means using system default value.</td></tr><tr><td>transport.max_timeout_heartbeat_count</td><td>120</td><td>The maximum times of timeout heartbeat on client side, if the number of timeouts waiting for heartbeat response continuously > max_heartbeat_timeouts the channel will be closed from client side.</td></tr><tr><td>transport.min_ack_interval</td><td>200</td><td>The minimum interval(in ms) of server reply ack.</td></tr><tr><td>transport.min_pending_requests</td><td>6</td><td>The minimum number of client unreceived ack, it will trigger the sending available if the number of unreceived ack &lt; min_pending_requests.</td></tr><tr><td>transport.network_retries</td><td>3</td><td>The number of retry attempts for network communication,if network unstable.</td></tr><tr><td>transport.provider_class</td><td>org.apache.hugegraph.computer.core.network.netty.NettyTransportProvider</td><td>The transport provider, currently only supports Netty.</td></tr><tr><td>transport.receive_buffer_size</td><td>0</td><td>The size of socket receive-buffer in bytes, 0 means using system default value.</td></tr><tr><td>transport.recv_file_mode</td><td>true</td><td>Whether enable receive buffer-file mode, it will receive buffer write file from socket by zero-copy if enable.</td></tr><tr><td>transport.send_buffer_size</td><td>0</td><td>The size of socket send-buffer in bytes, 0 means using system default value.</td></tr><tr><td>transport.server_host</td><td>127.0.0.1</td><td>The server hostname or ip to listen on to transfer data.</td></tr><tr><td>transport.server_idle_timeout</td><td>360000</td><td>The max timeout(in ms) of server idle.</td></tr><tr><td>transport.server_port</td><td>0</td><td>The server port to listen on to transfer data. The system will assign a random port if it&rsquo;s set to 0.</td></tr><tr><td>transport.server_threads</td><td>4</td><td>The number of transport threads for server.</td></tr><tr><td>transport.sync_request_timeout</td><td>10000</td><td>The timeout(in ms) to wait response after sending sync-request.</td></tr><tr><td>transport.tcp_keep_alive</td><td>true</td><td>Whether enable TCP keep-alive.</td></tr><tr><td>transport.transport_epoll_lt</td><td>false</td><td>Whether enable EPOLL level-trigger.</td></tr><tr><td>transport.write_buffer_high_mark</td><td>67108864</td><td>The high water mark for write buffer in bytes, it will trigger the sending unavailable if the number of queued bytes > write_buffer_high_mark.</td></tr><tr><td>transport.write_buffer_low_mark</td><td>33554432</td><td>The low water mark for write buffer in bytes, it will trigger the sending available if the number of queued bytes &lt; write_buffer_low_mark.org.apache.hugegraph.config.OptionChecker$$Lambda$97/0x00000008001c8440@776a6d9b</td></tr><tr><td>transport.write_socket_timeout</td><td>3000</td><td>The timeout(in ms) to write data to socket buffer.</td></tr><tr><td>valuefile.max_segment_size</td><td>1073741824</td><td>The max number of bytes in each segment of value-file.</td></tr><tr><td>worker.combiner_class</td><td>org.apache.hugegraph.computer.core.config.Null</td><td>Combiner can combine messages into one value for a vertex, for example page-rank algorithm can combine messages of a vertex to a sum value.</td></tr><tr><td>worker.computation_class</td><td>org.apache.hugegraph.computer.core.config.Null</td><td>The class to create worker-computation object, worker-computation is used to compute each vertex in each superstep.</td></tr><tr><td>worker.data_dirs</td><td>[jobs]</td><td>The directories separated by &lsquo;,&rsquo; that received vertices and messages can persist into.</td></tr><tr><td>worker.edge_properties_combiner_class</td><td>org.apache.hugegraph.computer.core.combiner.OverwritePropertiesCombiner</td><td>The combiner can combine several properties of the same edge into one properties at inputstep.</td></tr><tr><td>worker.partitioner</td><td>org.apache.hugegraph.computer.core.graph.partition.HashPartitioner</td><td>The partitioner that decides which partition a vertex should be in, and which worker a partition should be in.</td></tr><tr><td>worker.received_buffers_bytes_limit</td><td>104857600</td><td>The limit bytes of buffers of received data, the total size of all buffers can&rsquo;t excess this limit. If received buffers reach this limit, they will be merged into a file.</td></tr><tr><td>worker.vertex_properties_combiner_class</td><td>org.apache.hugegraph.computer.core.combiner.OverwritePropertiesCombiner</td><td>The combiner can combine several properties of the same vertex into one properties at inputstep.</td></tr><tr><td>worker.wait_finish_messages_timeout</td><td>86400000</td><td>The max timeout(in ms) message-handler wait for finish-message of all workers.</td></tr><tr><td>worker.wait_sort_timeout</td><td>600000</td><td>The max timeout(in ms) message-handler wait for sort-thread to sort one batch of buffers.</td></tr><tr><td>worker.write_buffer_capacity</td><td>52428800</td><td>The initial size of write buffer that used to store vertex or message.</td></tr><tr><td>worker.write_buffer_threshold</td><td>52428800</td><td>The threshold of write buffer, exceeding it will trigger sorting, the write buffer is used to store vertex or message.</td></tr></tbody></table><h3 id=k8s-operator-config-options>K8s Operator Config Options</h3><blockquote><p>NOTE: Option needs to be converted through environment variable settings, e.g. k8s.internal_etcd_url => INTERNAL_ETCD_URL</p></blockquote><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>k8s.auto_destroy_pod</td><td>true</td><td>Whether to automatically destroy all pods when the job is completed or failed.</td></tr><tr><td>k8s.close_reconciler_timeout</td><td>120</td><td>The max timeout(in ms) to close reconciler.</td></tr><tr><td>k8s.internal_etcd_url</td><td>http://127.0.0.1:2379</td><td>The internal etcd url for operator system.</td></tr><tr><td>k8s.max_reconcile_retry</td><td>3</td><td>The max retry times of reconcile.</td></tr><tr><td>k8s.probe_backlog</td><td>50</td><td>The maximum backlog for serving health probes.</td></tr><tr><td>k8s.probe_port</td><td>9892</td><td>The value is the port that the controller bind to for serving health probes.</td></tr><tr><td>k8s.ready_check_internal</td><td>1000</td><td>The time interval(ms) of check ready.</td></tr><tr><td>k8s.ready_timeout</td><td>30000</td><td>The max timeout(in ms) of check ready.</td></tr><tr><td>k8s.reconciler_count</td><td>10</td><td>The max number of reconciler thread.</td></tr><tr><td>k8s.resync_period</td><td>600000</td><td>The minimum frequency at which watched resources are reconciled.</td></tr><tr><td>k8s.timezone</td><td>Asia/Shanghai</td><td>The timezone of computer job and operator.</td></tr><tr><td>k8s.watch_namespace</td><td>hugegraph-computer-system</td><td>The value is watch custom resources in the namespace, ignore other namespaces, the &lsquo;*&rsquo; means is all namespaces will be watched.</td></tr></tbody></table><h3 id=hugegraph-computer-crd>HugeGraph-Computer CRD</h3><blockquote><p>CRD: <a href=https://github.com/apache/hugegraph-computer/blob/master/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml>https://github.com/apache/hugegraph-computer/blob/master/computer-k8s-operator/manifest/hugegraph-computer-crd.v1.yaml</a></p></blockquote><table><thead><tr><th>spec</th><th>default value</th><th>description</th><th>required</th></tr></thead><tbody><tr><td>algorithmName</td><td></td><td>The name of algorithm.</td><td>true</td></tr><tr><td>jobId</td><td></td><td>The job id.</td><td>true</td></tr><tr><td>image</td><td></td><td>The image of algorithm.</td><td>true</td></tr><tr><td>computerConf</td><td></td><td>The map of computer config options.</td><td>true</td></tr><tr><td>workerInstances</td><td></td><td>The number of worker instances, it will instead the &lsquo;job.workers_count&rsquo; option.</td><td>true</td></tr><tr><td>pullPolicy</td><td>Always</td><td>The pull-policy of image, detail please refer to: <a href=https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy>https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy</a></td><td>false</td></tr><tr><td>pullSecrets</td><td></td><td>The pull-secrets of Image, detail please refer to: <a href=https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod>https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod</a></td><td>false</td></tr><tr><td>masterCpu</td><td></td><td>The cpu limit of master, the unit can be &rsquo;m&rsquo; or without unit detail please refer to:<a href=https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu>https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu</a></td><td>false</td></tr><tr><td>workerCpu</td><td></td><td>The cpu limit of worker, the unit can be &rsquo;m&rsquo; or without unit detail please refer to:<a href=https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu>https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu</a></td><td>false</td></tr><tr><td>masterMemory</td><td></td><td>The memory limit of master, the unit can be one of Ei、Pi、Ti、Gi、Mi、Ki detail please refer to:<a href=https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory>https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory</a></td><td>false</td></tr><tr><td>workerMemory</td><td></td><td>The memory limit of worker, the unit can be one of Ei、Pi、Ti、Gi、Mi、Ki detail please refer to:<a href=https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory>https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory</a></td><td>false</td></tr><tr><td>log4jXml</td><td></td><td>The content of log4j.xml for computer job.</td><td>false</td></tr><tr><td>jarFile</td><td></td><td>The jar path of computer algorithm.</td><td>false</td></tr><tr><td>remoteJarUri</td><td></td><td>The remote jar uri of computer algorithm, it will overlay algorithm image.</td><td>false</td></tr><tr><td>jvmOptions</td><td></td><td>The java startup parameters of computer job.</td><td>false</td></tr><tr><td>envVars</td><td></td><td>please refer to: <a href=https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/>https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/</a></td><td>false</td></tr><tr><td>envFrom</td><td></td><td>please refer to: <a href=https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/>https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/</a></td><td>false</td></tr><tr><td>masterCommand</td><td>bin/start-computer.sh</td><td>The run command of master, equivalent to &lsquo;Entrypoint&rsquo; field of Docker.</td><td>false</td></tr><tr><td>masterArgs</td><td>["-r master", &ldquo;-d k8s&rdquo;]</td><td>The run args of master, equivalent to &lsquo;Cmd&rsquo; field of Docker.</td><td>false</td></tr><tr><td>workerCommand</td><td>bin/start-computer.sh</td><td>The run command of worker, equivalent to &lsquo;Entrypoint&rsquo; field of Docker.</td><td>false</td></tr><tr><td>workerArgs</td><td>["-r worker", &ldquo;-d k8s&rdquo;]</td><td>The run args of worker, equivalent to &lsquo;Cmd&rsquo; field of Docker.</td><td>false</td></tr><tr><td>volumes</td><td></td><td>Please refer to: <a href=https://kubernetes.io/docs/concepts/storage/volumes/>https://kubernetes.io/docs/concepts/storage/volumes/</a></td><td>false</td></tr><tr><td>volumeMounts</td><td></td><td>Please refer to: <a href=https://kubernetes.io/docs/concepts/storage/volumes/>https://kubernetes.io/docs/concepts/storage/volumes/</a></td><td>false</td></tr><tr><td>secretPaths</td><td></td><td>The map of k8s-secret name and mount path.</td><td>false</td></tr><tr><td>configMapPaths</td><td></td><td>The map of k8s-configmap name and mount path.</td><td>false</td></tr><tr><td>podTemplateSpec</td><td></td><td>Please refer to: <a href=https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-template-v1/#PodTemplateSpec>https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-template-v1/#PodTemplateSpec</a></td><td>false</td></tr><tr><td>securityContext</td><td></td><td>Please refer to: <a href=https://kubernetes.io/docs/tasks/configure-pod-container/security-context/>https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</a></td><td>false</td></tr></tbody></table><h3 id=kubedriver-config-options>KubeDriver Config Options</h3><table><thead><tr><th>config option</th><th>default value</th><th>description</th></tr></thead><tbody><tr><td>k8s.build_image_bash_path</td><td></td><td>The path of command used to build image.</td></tr><tr><td>k8s.enable_internal_algorithm</td><td>true</td><td>Whether enable internal algorithm.</td></tr><tr><td>k8s.framework_image_url</td><td>hugegraph/hugegraph-computer:latest</td><td>The image url of computer framework.</td></tr><tr><td>k8s.image_repository_password</td><td></td><td>The password for login image repository.</td></tr><tr><td>k8s.image_repository_registry</td><td></td><td>The address for login image repository.</td></tr><tr><td>k8s.image_repository_url</td><td>hugegraph/hugegraph-computer</td><td>The url of image repository.</td></tr><tr><td>k8s.image_repository_username</td><td></td><td>The username for login image repository.</td></tr><tr><td>k8s.internal_algorithm</td><td>[pageRank]</td><td>The name list of all internal algorithm.</td></tr><tr><td>k8s.internal_algorithm_image_url</td><td>hugegraph/hugegraph-computer:latest</td><td>The image url of internal algorithm.</td></tr><tr><td>k8s.jar_file_dir</td><td>/cache/jars/</td><td>The directory where the algorithm jar to upload location.</td></tr><tr><td>k8s.kube_config</td><td>~/.kube/config</td><td>The path of k8s config file.</td></tr><tr><td>k8s.log4j_xml_path</td><td></td><td>The log4j.xml path for computer job.</td></tr><tr><td>k8s.namespace</td><td>hugegraph-computer-system</td><td>The namespace of hugegraph-computer system.</td></tr><tr><td>k8s.pull_secret_names</td><td>[]</td><td>The names of pull-secret for pulling image.</td></tr></tbody></table></div><div class=td-content style=page-break-before:always><h1 id=pg-8f8368cdf9ec684d30761c6d28a34179>5 - API</h1></div><div class=td-content><h1 id=pg-a809bf70d5493b5046619919800e4de6>5.1 - HugeGraph RESTful API</h1><p>HugeGraph-Server provides interfaces for clients to operate on graphs based on the HTTP protocol through the HugeGraph-API. These interfaces primarily include the ability to add, delete, modify, and query metadata and graph data, perform traversal algorithms, handle variables, and perform other graph-related operations.</p><p>Expect the doc below, you can also use <code>swagger-ui</code> to visit the <code>RESTful API</code> by <code>localhost:8080/swagger-ui/index.html</code>. <a href=/docs/quickstart/hugegraph-server#swaggerui-example>Here is an example</a></p></div><div class=td-content style=page-break-before:always><h1 id=pg-698c3217de07a8cb0dc0e93dbae29ee9>5.1.1 - Schema API</h1><h3 id=11-schema>1.1 Schema</h3><p>HugeGraph provides a single interface to get all Schema information of a graph, including: PropertyKey, VertexLabel, EdgeLabel and IndexLabel.</p><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph_name}/schema
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>e.g: GET http://localhost:8080/graphs/hugegraph/schema
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;propertykeys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;DOUBLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.316&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.309&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.287&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.280&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.301&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;DOUBLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.294&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.250&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertexlabels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;PRIMARY_KEY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;personByAgeAndCity&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.336&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CUSTOMIZE_NUMBER&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;softwareByPrice&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;price&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.347&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edgelabels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;knowsByWeight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:08.437&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;createdByWeight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:08.446&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;indexlabels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;RANGE_INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:05.375&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:06.898&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByAgeAndCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:07.407&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;softwareByPrice&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;RANGE_DOUBLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;price&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:07.916&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;EDGE_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:08.454&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;createdByWeight&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;EDGE_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;RANGE_DOUBLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:08.963&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knowsByWeight&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;EDGE_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;RANGE_DOUBLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2023-05-08 17:49:09.473&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-f7f4b3b6f4b7a965f8c30675df8e56f8>5.1.2 - PropertyKey API</h1><h3 id=12-propertykey>1.2 PropertyKey</h3><p>Params Description:</p><ul><li>name: The name of the property type, required.</li><li>data_type: The data type of the property type, including: bool, byte, int, long, float, double, string, date, uuid, blob. The default data type is string.</li><li>cardinality: The cardinality of the property type, including: single, list, set. The default cardinality is single.</li></ul><p>Request Body Field Description:</p><ul><li>id: The ID value of the property type.</li><li>properties: The properties of the property type. For properties, this field is empty.</li><li>user_data: Setting the common information of the property type, such as setting the value range of the age property from 0 to 100. Currently, no validation is performed on this field, and it is only a reserved entry for future expansion.</li></ul><h4 id=121-create-a-propertykey>1.2.1 Create a PropertyKey</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/schema/propertykeys
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;property_key&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2022-05-13 13:47:23.745&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=122-add-or-remove-userdata-for-an-existing-propertykey>1.2.2 Add or Remove userdata for an existing PropertyKey</h4><h5 id=params>Params</h5><ul><li>action: Indicates whether the current action is to add or remove userdata. Possible values are <code>append</code> (add) and <code>eliminate</code> (remove).</li></ul><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/schema/propertykeys/age?action=append
</span></span></code></pre></div><h5 id=request-body-1>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;property_key&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2022-05-13 13:47:23.745&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=123-get-all-propertykeys>1.2.3 Get all PropertyKeys</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/propertykeys
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;propertykeys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;DOUBLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=124-get-propertykey-according-to-name>1.2.4 Get PropertyKey according to name</h4><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/propertykeys/age
</span></span></code></pre></div><p>Where <code>age</code> is the name of the PropertyKey to be retrieved.</p><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;INT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cardinality&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aggregate_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;write_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CREATED&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;~create_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2022-05-13 13:47:23.745&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=125-delete-propertykey-according-to-name>1.2.5 Delete PropertyKey according to name</h4><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/schema/propertykeys/age
</span></span></code></pre></div><p>Where <code>age</code> is the name of the PropertyKey to be deleted.</p><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span> <span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-28cb205879be97a55ddc8cd365c4438e>5.1.3 - VertexLabel API</h1><h3 id=13-vertexlabel>1.3 VertexLabel</h3><p>Assuming that the PropertyKeys listed in 1.1.3 have already been created.</p><p>Params Description:</p><ul><li>id: The ID value of the vertex type.</li><li>name: The name of the vertex type, required.</li><li>id_strategy: The ID strategy for the vertex type, including primary key ID, auto-generated, custom string, custom number, custom UUID. The default strategy is primary key ID.</li><li>properties: The property types associated with the vertex type.</li><li>primary_keys: The primary key properties. This field must have a value when the ID strategy is PRIMARY_KEY, and must be empty for other ID strategies.</li><li>enable_label_index: Whether to enable label indexing. It is disabled by default.</li><li>index_names: The indexes created for the vertex type. See details in section 3.4.</li><li>nullable_keys: Nullable properties.</li><li>user_data: Setting the common information of the vertex type, similar to the property type.</li></ul><h4 id=131-create-a-vertexlabel>1.3.1 Create a VertexLabel</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/schema/vertexlabels
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;DEFAULT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;PRIMARY_KEY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person2&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Starting from version v0.11.2, hugegraph-server supports Time-to-Live (TTL) functionality for vertices. The TTL for vertices is set through VertexLabel. For example, if you want the vertices of type &ldquo;person&rdquo; to have a lifespan of one day, you need to set the TTL field to 86400000 (in milliseconds) when creating the &ldquo;person&rdquo; VertexLabel.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;DEFAULT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>86400000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Additionally, if the vertex has a property called &ldquo;createdTime&rdquo; and you want to use it as the starting point for calculating the vertex&rsquo;s lifespan, you can set the ttl_start_time field in the VertexLabel. For example, if the &ldquo;person&rdquo; VertexLabel has a property called &ldquo;createdTime&rdquo; of type Date, and you want the vertices of type &ldquo;person&rdquo; to live for one day starting from the creation time, the Request Body for creating the &ldquo;person&rdquo; VertexLabel would be as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;DEFAULT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;createdTime&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>86400000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl_start_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;createdTime&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=132-add-properties-or-userdata-to-an-existing-vertexlabel-or-remove-userdata-removing-properties-is-currently-not-supported>1.3.2 Add properties or userdata to an existing VertexLabel, or remove userdata (removing properties is currently not supported)</h4><h5 id=params>Params</h5><ul><li>action: Indicates whether the current action is to add or remove. Possible values are <code>append</code> (add) and <code>eliminate</code> (remove).</li></ul><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/schema/vertexlabels/person?action=append
</span></span></code></pre></div><h5 id=request-body-1>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;super&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;animal&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;PRIMARY_KEY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;super&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;animal&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=133-get-all-vertexlabels>1.3.3 Get all VertexLabels</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/vertexlabels
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertexlabels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;PRIMARY_KEY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;super&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;animal&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;PRIMARY_KEY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;lang&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;price&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=134-get-vertexlabel-by-name>1.3.4 Get VertexLabel by name</h4><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/vertexlabels/person
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;primary_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id_strategy&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;PRIMARY_KEY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;super&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;animal&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=135-delete-vertexlabel-by-name>1.3.5 Delete VertexLabel by name</h4><p>Deleting a VertexLabel will result in the removal of corresponding vertices and related index data. This operation will generate an asynchronous task.</p><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/schema/vertexlabels/person
</span></span></code></pre></div><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can use <code>GET http://localhost:8080/graphs/hugegraph/tasks/1</code> (where &ldquo;1&rdquo; is the task_id) to query the execution status of the asynchronous task. For more information, refer to the <a href=../task>Asynchronous Task RESTful API</a>.</p></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-41864d99c39fc7040549f6eaf5441daf>5.1.4 - EdgeLabel API</h1><h3 id=14-edgelabel>1.4 EdgeLabel</h3><p>Assuming PropertyKeys from version 1.2.3 and VertexLabels from version 1.3.3 have already been created.</p><p>Params Explanation</p><ul><li>name: Name of the vertex type, required.</li><li>source_label: Name of the source vertex type, required.</li><li>target_label: Name of the target vertex type, required.</li><li>frequency: Whether there can be multiple edges between two points, can have values SINGLE or MULTIPLE, optional (default value: SINGLE).</li><li>properties: Property types associated with the edge type, optional.</li><li>sort_keys: Specifies a list of differentiating key properties when multiple associations are allowed.</li><li>nullable_keys: Nullable properties, optional (default: nullable).</li><li>enable_label_index: Whether to enable type indexing, disabled by default.</li></ul><h4 id=141-create-an-edgelabel>1.4.1 Create an EdgeLabel</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/schema/edgelabels
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Starting from version 0.11.2 of hugegraph-server, the TTL (Time to Live) feature for edges is supported. The TTL for edges is set through EdgeLabel. For example, if you want the &ldquo;knows&rdquo; type of edge to have a lifespan of one day, you need to set the TTL field to 86400000 when creating the &ldquo;knows&rdquo; EdgeLabel, where the unit is milliseconds.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;createdTime&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>86400000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Additionally, when the edge has a property called &ldquo;createdTime&rdquo; and you want to use the &ldquo;createdTime&rdquo; property as the starting point for calculating the edge&rsquo;s lifespan, you can set the ttl_start_time field in the EdgeLabel. For example, if the knows EdgeLabel has a property called &ldquo;createdTime&rdquo; which is of type Date, and you want the &ldquo;knows&rdquo; type of edge to live for one day from the time of creation, the Request Body for creating the knows EdgeLabel would be as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;createdTime&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>86400000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ttl_start_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;createdTime&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=142-add-properties-or-userdata-to-an-existing-edgelabel-or-remove-userdata-removing-properties-is-currently-not-supported>1.4.2 Add properties or userdata to an existing EdgeLabel, or remove userdata (removing properties is currently not supported)</h4><h5 id=params>Params</h5><ul><li>action: Indicates whether the current action is to add or remove, with values <code>append</code> (add) and <code>eliminate</code> (remove).</li></ul><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/schema/edgelabels/created?action=append
</span></span></code></pre></div><h5 id=request-body-1>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=143-get-all-edgelabels>1.4.3 Get all EdgeLabels</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/edgelabels
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edgelabels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=144-get-edgelabel-by-name>1.4.4 Get EdgeLabel by name</h4><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/edgelabels/created
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_names&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;frequency&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SINGLE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nullable_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;weight&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;enable_label_index&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=145-delete-edgelabel-by-name>1.4.5 Delete EdgeLabel by name</h4><p>Deleting an EdgeLabel will result in the deletion of corresponding edges and related index data. This operation will generate an asynchronous task.</p><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/schema/edgelabels/created
</span></span></code></pre></div><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can query the execution status of an asynchronous task by using <code>GET http://localhost:8080/graphs/hugegraph/tasks/1</code> (where &ldquo;1&rdquo; is the task_id). For more information, refer to the <a href=../task>Asynchronous Task RESTful API</a>.</p></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-7099742fb947ad5dfde9e72216c10b8a>5.1.5 - IndexLabel API</h1><h3 id=15-indexlabel>1.5 IndexLabel</h3><p>Assuming PropertyKeys from version 1.1.3, VertexLabels from version 1.2.3, and EdgeLabels from version 1.3.3 have already been created.</p><h4 id=151-create-an-indexlabel>1.5.1 Create an IndexLabel</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/schema/indexlabels
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=152-get-all-indexlabels>1.5.2 Get all IndexLabels</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/indexlabels
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;indexlabels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;softwareByPrice&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;price&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;RANGE&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;EDGE_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;date&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByAgeAndCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=153-get-indexlabel-by-name>1.5.3 Get IndexLabel by name</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/schema/indexlabels/personByCity
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;VERTEX_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;base_value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;fields&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;city&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;index_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SECONDARY&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=154-delete-indexlabel-by-name>1.5.4 Delete IndexLabel by name</h4><p>Deleting an IndexLabel will result in the deletion of related index data. This operation will generate an asynchronous task.</p><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/schema/indexlabels/personByCity
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can query the execution status of an asynchronous task by using <code>GET http://localhost:8080/graphs/hugegraph/tasks/1</code> (where &ldquo;1&rdquo; is the task_id). For more information, refer to the <a href=../task>Asynchronous Task RESTful API</a>.</p></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-bde129922f801ad9560757fcec64d05c>5.1.6 - Rebuild API</h1><h3 id=16-rebuild>1.6 Rebuild</h3><h4 id=161-rebuild-indexlabel>1.6.1 Rebuild IndexLabel</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/jobs/rebuild/indexlabels/personByCity
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can get the asynchronous job status by <code>GET http://localhost:8080/graphs/hugegraph/tasks/${task_id}</code> (the task_id here should be 1). See More <a href=../task>AsyncJob RESTfull API</a></p></blockquote><h4 id=162-rebulid-all-indexs-of-vertexlabel>1.6.2 Rebulid all Indexs of VertexLabel</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/jobs/rebuild/vertexlabels/person
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can get the asynchronous job status by <code>GET http://localhost:8080/graphs/hugegraph/tasks/${task_id}</code> (the task_id here should be 2). See More <a href=../task>AsyncJob RESTfull API</a></p></blockquote><h4 id=163-rebulid-all-indexs-of-edgelabel>1.6.3 Rebulid all Indexs of EdgeLabel</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/jobs/rebuild/edgelabels/created
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can get the asynchronous job status by <code>GET http://localhost:8080/graphs/hugegraph/tasks/${task_id}</code> (the task_id here should be 3). See More <a href=../task>AsyncJob RESTfull API</a></p></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-86bf520fd6b098231f4af6590328e871>5.1.7 - Vertex API</h1><h3 id=21-vertex>2.1 Vertex</h3><p>In vertex types, the <code>Id</code> strategy determines the type of the vertex <code>Id</code>, with the corresponding relationships as follows:</p><table><thead><tr><th>Id_Strategy</th><th>id type</th></tr></thead><tbody><tr><td>AUTOMATIC</td><td>number</td></tr><tr><td>PRIMARY_KEY</td><td>string</td></tr><tr><td>CUSTOMIZE_STRING</td><td>string</td></tr><tr><td>CUSTOMIZE_NUMBER</td><td>number</td></tr><tr><td>CUSTOMIZE_UUID</td><td>uuid</td></tr></tbody></table><p>For the <code>GET/PUT/DELETE</code> API of a vertex, the id part in the URL should be passed as the id value with type information. This type information is indicated by whether the JSON string is enclosed in quotes, meaning:</p><ul><li>When the id type is <code>number</code>, the id in the URL is without quotes, for example: <code>xxx/vertices/123456</code>.</li><li>When the id type is <code>string</code>, the id in the URL is enclosed in quotes, for example: <code>xxx/vertices/"123456"</code>.</li></ul><hr><p>The next example requires first creating the graph <code>schema</code> from the following <code>groovy</code> script</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;hobby&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>valueList</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;hobby&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;hobby&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h4 id=211-create-a-vertex>2.1.1 Create a vertex</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/graph/vertices
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=212-create-multiple-vertices>2.1.2 Create multiple vertices</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/graph/vertices/batch
</span></span></code></pre></div><h5 id=request-body-1>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>]</span>
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>]</span>
</span></span></code></pre></div><h4 id=213-update-vertex-properties>2.1.3 Update vertex properties</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://127.0.0.1:8080/graphs/hugegraph/graph/vertices/&#34;1:marko&#34;?action=append
</span></span></code></pre></div><h5 id=request-body-2>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>30</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><blockquote><p>Note: There are three categories for property values: single, set, and list. If it is single, it means adding or updating the property value. If it is set or list, it means appending the property value.</p></blockquote><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>30</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=214-batch-update-vertex-properties>2.1.4 Batch Update Vertex Properties</h4><h5 id=function-description>Function Description</h5><p>Batch update properties of vertices and support various update strategies, including:</p><ul><li>SUM: Numeric accumulation</li><li>BIGGER: Take the larger value between two numbers/dates</li><li>SMALLER: Take the smaller value between two numbers/dates</li><li>UNION: Take the union of set properties</li><li>INTERSECTION: Take the intersection of set properties</li><li>APPEND: Append elements to list properties</li><li>ELIMINATE: Remove elements from list/set properties</li><li>OVERRIDE: Override existing properties, if the new property is null, the old property is still used</li></ul><p>Assuming the original vertex and properties are:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;hobby&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;reading&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;football&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Add vertices with the following command:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>curl -H <span style=color:#4e9a06>&#34;Content-Type: application/json&#34;</span> -d <span style=color:#4e9a06>&#39;[{&#34;label&#34;:&#34;person&#34;,&#34;properties&#34;:{&#34;name&#34;:&#34;josh&#34;,&#34;age&#34;:32,&#34;city&#34;:&#34;Beijing&#34;,&#34;weight&#34;:0.1,&#34;hobby&#34;:[&#34;reading&#34;,&#34;football&#34;]}},{&#34;label&#34;:&#34;software&#34;,&#34;properties&#34;:{&#34;name&#34;:&#34;lop&#34;,&#34;lang&#34;:&#34;java&#34;,&#34;price&#34;:328}}]&#39;</span> http:///127.0.0.1:8080/graphs/hugegraph/graph/vertices/batch
</span></span></code></pre></div><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://127.0.0.1:8080/graphs/hugegraph/graph/vertices/batch
</span></span></code></pre></div><h5 id=request-body-3>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;c++&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>299</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;hobby&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;swimming&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;update_strategies&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;BIGGER&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OVERRIDE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OVERRIDE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SUM&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;hobby&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;UNION&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;create_if_not_exist&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;c++&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;hobby&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;reading&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;football&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;swimming&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Result Analysis:</p><ul><li>The lang property does not specify an update strategy and is directly overwritten by the new value, regardless of whether the new value is null.</li><li>The price property specifies the BIGGER update strategy. The old property value is 328, and the new property value is 299, so the old property value of 328 is retained.</li><li>The age property specifies the OVERRIDE update strategy, but the new property value does not include age, which is equivalent to age being null. Therefore, the original property value of 32 is still retained.</li><li>The city property also specifies the OVERRIDE update strategy, and the new property value is not null, so it overrides the old value.</li><li>The weight property specifies the SUM update strategy. The old property value is 0.1, and the new property value is 0.2. The final value is 0.3.</li><li>The hobby property (cardinality is Set) specifies the UNION update strategy, so the new value is taken as the union with the old value.</li></ul><p>The usage of other update strategies can be inferred in a similar manner and will not be further elaborated.</p><h4 id=215-delete-vertex-properties>2.1.5 Delete Vertex Properties</h4><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://127.0.0.1:8080/graphs/hugegraph/graph/vertices/&#34;1:marko&#34;?action=eliminate
</span></span></code></pre></div><h5 id=request-body-4>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><blockquote><p>Note: Here, the properties (keys and all values) will be directly deleted, regardless of whether the property values are single, set, or list.</p></blockquote><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>30</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=216-get-vertices-that-meet-the-criteria>2.1.6 Get Vertices that Meet the Criteria</h4><h5 id=params>Params</h5><ul><li>label: Vertex type</li><li>properties: Property key-value pairs (precondition: indexes are created for property queries)</li><li>limit: Maximum number of results</li><li>page: Page number</li></ul><p>All of the above parameters are optional. If the <code>page</code> parameter is provided, the <code>limit</code> parameter must also be provided, and no other parameters are allowed. <code>label, properties</code>, and <code>limit</code> can be combined in any way.</p><p>Property key-value pairs consist of the property name and value in JSON format. Multiple property key-value pairs are allowed as query conditions. The property value supports exact matching, range matching, and fuzzy matching. For exact matching, use the format <code>properties={"age":29}</code>, for range matching, use the format <code>properties={"age":"P.gt(29)"}</code>, and for fuzzy matching, use the format <code>properties={"city": "P.textcontains("ChengDu China")}</code>. The following expressions are supported for range matching:</p><table><thead><tr><th>Expression</th><th>Explanation</th></tr></thead><tbody><tr><td>P.eq(number)</td><td>Vertices with property value equal to <code>number</code></td></tr><tr><td>P.neq(number)</td><td>Vertices with property value not equal to <code>number</code></td></tr><tr><td>P.lt(number)</td><td>Vertices with property value less than <code>number</code></td></tr><tr><td>P.lte(number)</td><td>Vertices with property value less than or equal to <code>number</code></td></tr><tr><td>P.gt(number)</td><td>Vertices with property value greater than <code>number</code></td></tr><tr><td>P.gte(number)</td><td>Vertices with property value greater than or equal to <code>number</code></td></tr><tr><td>P.between(number1,number2)</td><td>Vertices with property value greater than or equal to <code>number1</code> and less than <code>number2</code></td></tr><tr><td>P.inside(number1,number2)</td><td>Vertices with property value greater than <code>number1</code> and less than <code>number2</code></td></tr><tr><td>P.outside(number1,number2)</td><td>Vertices with property value less than <code>number1</code> and greater than <code>number2</code></td></tr><tr><td>P.within(value1,value2,value3,&mldr;)</td><td>Vertices with property value equal to any of the given <code>values</code></td></tr></tbody></table><p><strong>Query all vertices with age 29 and label person</strong></p><h5 id=method--url-5>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/graph/vertices?label=person&amp;properties={&#34;age&#34;:29}&amp;limit=1
</span></span></code></pre></div><h5 id=response-status-5>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-5>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>30</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p><strong>Paginate through all vertices, retrieve the first page (page without parameter value), limited to 3 records</strong></p><p>Add vertices with the following command:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>curl -H <span style=color:#4e9a06>&#34;Content-Type: application/json&#34;</span> -d <span style=color:#4e9a06>&#39;[{&#34;label&#34;:&#34;person&#34;,&#34;properties&#34;:{&#34;name&#34;:&#34;peter&#34;,&#34;age&#34;:29,&#34;city&#34;:&#34;Shanghai&#34;}},{&#34;label&#34;:&#34;person&#34;,&#34;properties&#34;:{&#34;name&#34;:&#34;vadas&#34;,&#34;age&#34;:27,&#34;city&#34;:&#34;Hongkong&#34;}}]&#39;</span> http://localhost:8080/graphs/hugegraph/graph/vertices/batch
</span></span></code></pre></div><h5 id=method--url-6>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/graph/vertices?page&amp;limit=3
</span></span></code></pre></div><h5 id=response-status-6>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-6>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;c++&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;hobby&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;reading&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;football&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;swimming&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>30</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;page&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;CIYxOnBldGVyAAAAAAAAAAM=&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>The returned <code>body</code> contains information about the page number of the next <code>page</code>, <code>"page": "CIYxOnBldGVyAAAAAAAAAAM"</code>. When querying the next page, assign this value to the <code>page</code> parameter.</p><p><strong>Paginate and retrieve all vertices, including the next page (passing the <code>page</code> value returned from the previous page), limited to 3 items.</strong></p><h5 id=method--url-7>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/graph/vertices?page=CIYxOnBldGVyAAAAAAAAAAM=&amp;limit=3
</span></span></code></pre></div><h5 id=response-status-7>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-7>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>27</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;page&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>At this point, <code>"page": null</code> indicates that there are no more pages available. (Note: When using Cassandra as the backend for performance reasons, if the returned page happens to be the last page, the <code>page</code> value may not be empty. When requesting the next page using that <code>page</code> value, it will return <code>empty data</code> and <code>page = null</code>. The same applies to other similar situations.)</p><h4 id=217-retrieve-vertex-by-id>2.1.7 Retrieve Vertex by ID</h4><h5 id=method--url-8>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/graph/vertices/&#34;1:marko&#34;
</span></span></code></pre></div><h5 id=response-status-8>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-8>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>30</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=218-delete-vertex-by-id>2.1.8 Delete Vertex by ID</h4><h5 id=params-1>Params</h5><ul><li>label: Vertex type, optional parameter</li></ul><p><strong>Delete the vertex based on ID only.</strong></p><h5 id=method--url-9>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/graph/vertices/&#34;1:marko&#34;
</span></span></code></pre></div><h5 id=response-status-9>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><p><strong>Delete Vertex by Label+ID</strong></p><p>When deleting a vertex by specifying both the Label parameter and the ID, it generally offers better performance compared to deleting by ID alone.</p><h5 id=method--url-10>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/graph/vertices/&#34;1:marko&#34;?label=person
</span></span></code></pre></div><h5 id=response-status-10>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-f40127b155ddd802d50c507ff1cf5530>5.1.8 - Edge API</h1><h3 id=22-edge>2.2 Edge</h3><p>The modification of the vertex ID format also affects the ID of the edge, as well as the formats of the source vertex and target vertex IDs.</p><p>The EdgeId is formed by concatenating <code>src-vertex-id + direction + label + sort-values + tgt-vertex-id</code>, but the vertex ID types are not distinguished by quotation marks here. Instead, they are distinguished by prefixes:</p><ul><li>When the ID type is number, the vertex ID in the EdgeId has a prefix <code>L</code>, like &ldquo;L123456>1&#187;L987654&rdquo;.</li><li>When the ID type is string, the vertex ID in the EdgeId has a prefix <code>S</code>, like &ldquo;S1:peter>1&#187;S2:lop&rdquo;.</li></ul><hr><p>The following example requires creating a graph <code>schema</code> based on the following <code>groovy</code> script:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.HugeFactory</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.tinkerpop.gremlin.structure.T</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>conf</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#4e9a06>&#34;conf/graphs/hugegraph.properties&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000>graph</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>HugeFactory</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>open</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>conf</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAgeAndCity&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;softwareByPrice&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knowsByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>marko</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>vadas</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>27</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>lop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>328</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>josh</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>ripple</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>199</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>peter</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>35</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>tx</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>commit</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>g</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>traversal</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h4 id=221-creating-an-edge>2.2.1 Creating an Edge</h4><h5 id=params>Params</h5><p><strong>Path Parameter Description:</strong></p><ul><li>graph: The graph to operate on</li></ul><p><strong>Request Body Description:</strong></p><ul><li>label: The edge type name (required)</li><li>outV: The source vertex id (required)</li><li>inV: The target vertex id (required)</li><li>outVLabel: The source vertex type (required)</li><li>inVLabel: The target vertex type (required)</li><li>properties: The properties associated with the edge. The internal structure of the object is as follows:<ol><li>name: The property name</li><li>value: The property value</li></ol></li></ul><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/graph/edges
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=222-creating-multiple-edges>2.2.2 Creating Multiple Edges</h4><h5 id=params-1>Params</h5><p><strong>Path Parameter Description:</strong></p><ul><li>graph: The graph to operate on</li></ul><p><strong>Request Parameter Description:</strong></p><ul><li>check_vertex: Whether to check the existence of vertices (true | false). When set to true, an error will be thrown if the source or target vertices of the edge to be inserted do not exist. Default is true.</li></ul><p><strong>Request Body Description:</strong></p><ul><li>List of edge information</li></ul><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/graph/edges/batch
</span></span></code></pre></div><h5 id=request-body-1>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160110&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.5</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20130220&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>]</span>
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;&gt;S1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;&gt;S1:josh&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>]</span>
</span></span></code></pre></div><h4 id=223-updating-edge-properties>2.2.3 Updating Edge Properties</h4><h5 id=params-2>Params</h5><p><strong>Path Parameter Description:</strong></p><ul><li>graph: The graph to operate on</li><li>id: The ID of the edge to be operated on</li></ul><p><strong>Request Parameter Description:</strong></p><ul><li>action: The append action</li></ul><p><strong>Request Body Description:</strong></p><ul><li>Edge information</li></ul><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko&gt;2&gt;&gt;S2:lop?action=append
</span></span></code></pre></div><h5 id=request-body-2>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><blockquote><p>NOTE: There are three categories of property values: single, set, and list. If it is single, it means adding or updating the property value. If it is set or list, it means appending the property value.</p></blockquote><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=224-batch-updating-edge-properties>2.2.4 Batch Updating Edge Properties</h4><h5 id=params-3>Params</h5><p><strong>Path Parameter Description:</strong></p><ul><li>graph: The graph to operate on</li></ul><p><strong>Request Body Description:</strong></p><ul><li>edges: List of edge information</li><li>update_strategies: For each property, you can set its update strategy individually, including:<ul><li>SUM: Only supports number type</li><li>BIGGER/SMALLER: Only supports date/number type</li><li>UNION/INTERSECTION: Only supports set type</li><li>APPEND/ELIMINATE: Only supports collection type</li><li>OVERRIDE</li></ul></li><li>check_vertex: Whether to check the existence of vertices (true | false). When set to true, an error will be thrown if the source or target vertices of the edge to be inserted do not exist. Default is true.</li><li>create_if_not_exist: Currently only supports setting to true</li></ul><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://127.0.0.1:8080/graphs/hugegraph/graph/edges/batch
</span></span></code></pre></div><h5 id=request-body-3>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160111&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20130221&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.5</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;update_strategies&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;SUM&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OVERRIDE&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;check_vertex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;create_if_not_exist&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;&gt;S1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160111&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;&gt;S1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20130221&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=225-deleting-edge-properties>2.2.5 Deleting Edge Properties</h4><h5 id=params-4>Params</h5><p><strong>Path Parameter Description:</strong></p><ul><li>graph: The graph to operate on</li><li>id: The ID of the edge to be operated on</li></ul><p><strong>Request Parameter Description:</strong></p><ul><li>action: The eliminate action</li></ul><p><strong>Request Body Description:</strong></p><ul><li>Edge information</li></ul><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko&gt;2&gt;&gt;S2:lop?action=eliminate
</span></span></code></pre></div><h5 id=request-body-4>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><blockquote><p>NOTE: This will directly delete the properties (removing the key and all values), regardless of whether the property values are single, set, or list.</p></blockquote><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>400</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><p>It is not possible to delete an attribute that is not set as nullable.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;exception&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;class java.lang.IllegalArgumentException&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;message&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Can&#39;t remove non-null edge property &#39;p[weight-&gt;1.0]&#39;&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cause&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=226-fetching-edges-that-match-the-criteria>2.2.6 Fetching Edges that Match the Criteria</h4><h5 id=params-5>Params</h5><p><strong>Path Parameter:</strong></p><ul><li>graph: The graph to operate on</li></ul><p><strong>Request Parameters:</strong></p><ul><li>vertex_id: Vertex ID</li><li>direction: Edge direction (OUT | IN | BOTH), default is BOTH</li><li>label: Edge label</li><li>properties: Key-value pairs of properties (requires pre-built indexes for property queries)</li><li>keep_start_p: Default is false. When set to true, the range matching input expression will not be automatically escaped. For example, <code>properties={"age":"P.gt(0.8)"}</code> will be interpreted as an exact match, i.e., the age property is equal to &ldquo;P.gt(0.8)&rdquo;</li><li>offset: Offset, default is 0</li><li>limit: Number of queries, default is 100</li><li>page: Page number</li></ul><p>Key-value pairs of properties consist of the property name and value in JSON format. Multiple key-value pairs are allowed as query conditions. Property values support exact matching and range matching. For exact matching, it is in the form <code>properties={"weight":0.8}</code>. For range matching, it is in the form <code>properties={"age":"P.gt(0.8)"}</code>. The expressions supported by range matching are as follows:</p><table><thead><tr><th>Expression</th><th>Description</th></tr></thead><tbody><tr><td>P.eq(number)</td><td>Edges with property value equal to number</td></tr><tr><td>P.neq(number)</td><td>Edges with property value not equal to number</td></tr><tr><td>P.lt(number)</td><td>Edges with property value less than number</td></tr><tr><td>P.lte(number)</td><td>Edges with property value less than or equal to number</td></tr><tr><td>P.gt(number)</td><td>Edges with property value greater than number</td></tr><tr><td>P.gte(number)</td><td>Edges with property value greater than or equal to number</td></tr><tr><td>P.between(number1,number2)</td><td>Edges with property value greater than or equal to number1 and less than number2</td></tr><tr><td>P.inside(number1,number2)</td><td>Edges with property value greater than number1 and less than number2</td></tr><tr><td>P.outside(number1,number2)</td><td>Edges with property value less than number1 and greater than number2</td></tr><tr><td>P.within(value1,value2,value3,&mldr;)</td><td>Edges with property value equal to any of the given values</td></tr><tr><td>P.textcontains(value)</td><td>Edges with property value containing the given value (string type)</td></tr><tr><td>P.contains(value)</td><td>Edges with property value containing the given value (collection type)</td></tr></tbody></table><p><strong>Edges connected to the vertex person:marko(vertex_id=&ldquo;1:marko&rdquo;) with label knows and date property equal to &ldquo;20160111&rdquo;</strong></p><h5 id=method--url-5>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://127.0.0.1:8080/graphs/hugegraph/graph/edges?vertex_id=&#34;1:marko&#34;&amp;label=knows&amp;properties={&#34;date&#34;:&#34;P.within(\&#34;20160111\&#34;)&#34;}
</span></span></code></pre></div><h5 id=response-status-5>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-5>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;&gt;S1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160111&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p><strong>Paginate and retrieve all edges, get the first page (page without parameter value), limit to 2 entries</strong></p><h5 id=method--url-6>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://127.0.0.1:8080/graphs/hugegraph/graph/edges?page&amp;limit=2
</span></span></code></pre></div><h5 id=response-status-6>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-6>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;&gt;S1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20130221&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;&gt;S1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160111&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;page&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;EoYxOm1hcmtvgggCAIQyOmxvcAAAAAAAAAAC&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>The returned body contains the page number information for the next page, <code>"page": "EoYxOm1hcmtvgggCAIQyOmxvcAAAAAAAAAAC"</code>. When querying the next page, assign this value to the page parameter.</p><p><strong>Paginate and retrieve all edges, get the next page (include the page value returned from the previous page), limit to 2 entries</strong></p><h5 id=method--url-7>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://127.0.0.1:8080/graphs/hugegraph/graph/edges?page=EoYxOm1hcmtvgggCAIQyOmxvcAAAAAAAAAAC&amp;limit=2
</span></span></code></pre></div><h5 id=response-status-7>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-7>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;page&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>When <code>"page": null</code> is returned, it indicates that there are no more pages available.</p><blockquote><p>NOTE: When the backend is Cassandra, for performance considerations, if the returned page happens to be the last page, the <code>page</code> value may not be empty. When requesting the next page data using that <code>page</code> value, it will return <code>empty data</code> and <code>page = null</code>. Similar situations apply for other cases.</p></blockquote><h4 id=227-fetching-edge-by-id>2.2.7 Fetching Edge by ID</h4><h5 id=params-6>Params</h5><p><strong>Path parameter description:</strong></p><ul><li>graph: The graph to be operated on.</li><li>id: The ID of the edge to be operated on.</li></ul><h5 id=method--url-8>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko&gt;2&gt;&gt;S2:lop
</span></span></code></pre></div><h5 id=response-status-8>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-8>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=228-deleting-edge-by-id>2.2.8 Deleting Edge by ID</h4><h5 id=params-7>Params</h5><p><strong>Path parameter description:</strong></p><ul><li>graph: The graph to be operated on.</li><li>id: The ID of the edge to be operated on.</li></ul><p><strong>Request parameter description:</strong></p><ul><li>label: The label of the edge.</li></ul><p><strong>Deleting Edge by ID only</strong></p><h5 id=method--url-9>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko&gt;2&gt;&gt;S2:lop
</span></span></code></pre></div><h5 id=response-status-9>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><p><strong>Deleting Edge by Label + ID</strong></p><p>In general, specifying the Label parameter along with the ID to delete an edge will provide better performance compared to deleting by ID only.</p><h5 id=method--url-10>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko&gt;1&gt;&gt;S1:vadas?label=knows
</span></span></code></pre></div><h5 id=response-status-10>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-f0adc653be0b454ce1952bdaf0afefa6>5.1.9 - Traverser API</h1><h3 id=31-overview-of-traverser-api>3.1 Overview of Traverser API</h3><p>HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the <code>traverser API</code>. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.</p><p>The Traverser API supported by HugeGraph includes:</p><ul><li>K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:<ul><li>The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.</li><li>The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:<ul><li>Supports counting the number of neighbors only</li><li>Supports filtering by edge and vertex properties</li><li>Supports returning the shortest path to reach the neighbor</li></ul></li></ul></li><li>K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:<ul><li>The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.</li><li>The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:<ul><li>Supports counting the number of neighbors only</li><li>Supports filtering by edge and vertex properties</li><li>Supports returning the shortest path to reach the neighbor</li></ul></li></ul></li><li>Same Neighbors: It queries the common neighbors of two vertices.</li><li>Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:<ul><li>One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.</li><li>The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.</li></ul></li><li>Shortest Path API: It finds the shortest path between two vertices.</li><li>All Shortest Paths: It finds all shortest paths between two vertices.</li><li>Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.</li><li>Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.</li><li>Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.</li><li>Paths API: It finds all paths between two vertices. There are two versions:<ul><li>The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.</li><li>The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.</li></ul></li></ul><h3 id=32-detailed-explanation-of-traverser-api>3.2 Detailed Explanation of Traverser API</h3><p>In the following, we provide a detailed explanation of the Traverser API:</p><ul><li>Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.</li><li>Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.</li><li>Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.</li><li>Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.</li><li>Rings API: It finds the cyclic paths that can be reached from a starting vertex.</li><li>Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).</li><li>Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.</li><li>Vertices API:<ul><li>Batch querying vertices by ID.</li><li>Getting the partitions of vertices.</li><li>Querying vertices by partition.</li></ul></li><li>Edges API:<ul><li>Batch querying edges by ID.</li><li>Getting the partitions of edges.</li><li>Querying edges by partition.</li></ul></li></ul><h3 id=32-detailed-explanation-of-traverser-api-1>3.2 Detailed Explanation of Traverser API</h3><p>The usage examples provided in this section are based on the graph presented on the TinkerPop official website:</p><p><img src=http://tinkerpop.apache.org/docs/3.4.0/images/tinkerpop-modern.png alt="tinkerpop example graph"></p><p>The data import program is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>Loader</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>[]</span> <span style=color:#000>args</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>HugeClient</span> <span style=color:#000>client</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>HugeClient</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;http://127.0.0.1:8080&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>SchemaManager</span> <span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>client</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asDouble</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByCity&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAgeAndCity&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;softwareByPrice&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>multiTimes</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sortKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knowsByWeight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>GraphManager</span> <span style=color:#000>graph</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>client</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>graph</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>marko</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>29</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>vadas</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>27</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>lop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>328</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>josh</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>32</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>ripple</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>199</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>peter</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>35</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;20160110&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>5</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;20130220&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>0</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;20171210&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>4</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;20091111&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>4</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;20171210&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>0</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;20170324&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>2</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><p>The vertex IDs are:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>&#34;2:ripple&#34;,
</span></span><span style=display:flex><span>&#34;1:vadas&#34;,
</span></span><span style=display:flex><span>&#34;1:peter&#34;,
</span></span><span style=display:flex><span>&#34;1:josh&#34;,
</span></span><span style=display:flex><span>&#34;1:marko&#34;,
</span></span><span style=display:flex><span>&#34;2:lop&#34;
</span></span></code></pre></div><p>The edge IDs are:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>&#34;S1:peter&gt;2&gt;&gt;S2:lop&#34;,
</span></span><span style=display:flex><span>&#34;S1:josh&gt;2&gt;&gt;S2:lop&#34;,
</span></span><span style=display:flex><span>&#34;S1:josh&gt;2&gt;&gt;S2:ripple&#34;,
</span></span><span style=display:flex><span>&#34;S1:marko&gt;1&gt;20130220&gt;S1:josh&#34;,
</span></span><span style=display:flex><span>&#34;S1:marko&gt;1&gt;20160110&gt;S1:vadas&#34;,
</span></span><span style=display:flex><span>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;
</span></span></code></pre></div><h4 id=321-k-out-api-get-basic-version>3.2.1 K-out API (GET, Basic Version)</h4><h5 id=3211-functionality-overview>3.2.1.1 Functionality Overview</h5><p>The K-out API allows you to find vertices that are exactly &ldquo;depth&rdquo; steps away from a given starting vertex, considering the specified direction, edge type (optional), and depth.</p><h6 id=params>Params</h6><ul><li>source: ID of the starting vertex (required)</li><li>direction: Direction of traversal from the starting vertex (OUT, IN, BOTH). Optional, default is BOTH.</li><li>max_depth: Number of steps (required)</li><li>label: Edge type (optional), represents all edge labels by default</li><li>nearest: When nearest is set to true, it means the shortest path length from the starting vertex to the result vertices is equal to the depth, and there is no shorter path. When nearest is set to false, it means there is at least one path of length depth from the starting vertex to the result vertices (not necessarily the shortest and may contain cycles). Optional, default is true.</li><li>max_degree: Maximum number of adjacent edges to traverse per vertex during the query. Optional, default is 10000.</li><li>capacity: Maximum number of vertices to be visited during the traversal. Optional, default is 10000000.</li><li>limit: Maximum number of vertices to be returned. Optional, default is 10000000.</li></ul><h5 id=3212-usage-example>3.2.1.2 Usage Example</h5><h6 id=method--url>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/kout?source=&#34;1:marko&#34;&amp;max_depth=2
</span></span></code></pre></div><h6 id=response-status>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:peter&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3213-use-cases>3.2.1.3 Use Cases</h5><p>Finding vertices that are exactly N steps away in a relationship. Two examples:</p><ul><li>In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive &ldquo;son&rdquo; edges.</li><li>Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive &ldquo;friend&rdquo; edges.</li></ul><h4 id=322-k-out-api-post-advanced-version>3.2.2 K-out API (POST, Advanced Version)</h4><h5 id=3221-functionality-overview>3.2.2.1 Functionality Overview</h5><p>The K-out API allows you to find vertices that are exactly &ldquo;depth&rdquo; steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).</p><blockquote><p>The advanced version differs from the basic version of K-out API in the following aspects:</p><ul><li>Supports counting the number of neighbors only</li><li>Supports edge attribute filtering</li><li>Supports returning the shortest path to the neighbor</li></ul></blockquote><h6 id=params-1>Params</h6><ul><li>source: The ID of the starting vertex, required.</li><li>steps: Steps from the starting point, required, with the following structure:<ul><li>direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.</li><li>edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.<ul><li>label: Edge types.</li><li>properties: Filter edges based on property values.</li></ul></li><li>vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.<ul><li>label: Vertex types.</li><li>properties: Filter vertices based on property values.</li></ul></li><li>max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was &ldquo;degree&rdquo; instead of &ldquo;max_degree&rdquo;. Starting from version 0.12, &ldquo;max_degree&rdquo; is used uniformly, while still supporting the &ldquo;degree&rdquo; syntax for backward compatibility).</li><li>skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint <code>skip_degree >= max_degree</code>. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).</li></ul></li><li>max_depth: Number of steps, required.</li><li>nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.</li><li>count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.</li><li>with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.</li><li>with_edge: Optional parameter, default is false:<ul><li>When true, the result will include complete edge information (all edges in the path):<ul><li>When with_path is true, it returns complete information of all edges in all paths.</li><li>When with_path is false, no information is returned.</li></ul></li><li>When false, it only returns edge IDs.</li></ul></li><li>with_vertex: Optional parameter, default is false:<ul><li>When true, the result will include complete vertex information (all vertices in the path):<ul><li>When with_path is true, it returns complete information of all vertices in all paths.</li><li>When with_path is false, it returns complete information of all neighbors.</li></ul></li><li>When false, it only returns vertex IDs.</li></ul></li><li>capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.</li><li>limit: Maximum number of vertices to return. Optional, default is 10000000.</li><li>traverse_mode: Traversal mode. There are two options: &ldquo;breadth_first_search&rdquo; and &ldquo;depth_first_search&rdquo;, default is &ldquo;breadth_first_search&rdquo;.</li></ul><h5 id=3222-usage>3.2.2.2 Usage</h5><h6 id=method--url-1>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/kout
</span></span></code></pre></div><h6 id=request-body>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;steps&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;BOTH&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edge_steps&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;P.gt(0.1)&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;P.gt(0.1)&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertex_steps&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;P.lt(32)&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_depth&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nearest&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_edge&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-1>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-1>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;kout&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>27</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;20160110&gt;S1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20160110&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3223-use-cases>3.2.2.3 Use Cases</h5><p>Refer to 3.2.1.3.</p><h4 id=323-k-neighbor-get-basic-version>3.2.3 K-neighbor (GET, Basic Version)</h4><h5 id=3231-function-introduction>3.2.3.1 Function Introduction</h5><p>Find all vertices that are reachable within depth steps, including the starting vertex, based on the starting vertex, direction, edge type (optional), and depth.</p><blockquote><p>Equivalent to the union of: starting vertex, K-out(1), K-out(2), &mldr;, K-out(max_depth).</p></blockquote><h6 id=params-2>Params</h6><ul><li>source: ID of the starting vertex, required.</li><li>direction: Direction in which the starting vertex&rsquo;s edges extend (OUT, IN, BOTH). Optional, default is BOTH.</li><li>max_depth: Number of steps, required.</li><li>label: Edge type, optional, default represents all edge labels.</li><li>max_degree: Maximum number of adjacent edges to traverse for a single vertex during the query process. Optional, default is 10000.</li><li>limit: Maximum number of vertices to return, also represents the maximum number of vertices to visit during traversal. Optional, default is 10000000.</li></ul><h5 id=3232-usage>3.2.3.2 Usage</h5><h6 id=method--url-2>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&amp;max_depth=2
</span></span></code></pre></div><h6 id=response-status-2>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-2>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3233-use-cases>3.2.3.3 Use Cases</h5><p>Find all vertices reachable within N steps, for example:</p><ul><li>In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive &ldquo;parent-child&rdquo; edges from person A.</li><li>In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 &ldquo;friend&rdquo; edges from the target user can form the target user&rsquo;s friend circle.</li></ul><h4 id=324-k-neighbor-api-post-advanced-version>3.2.4 K-neighbor API (POST, Advanced Version)</h4><h5 id=3241-function-introduction>3.2.4.1 Function Introduction</h5><p>Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.</p><blockquote><p>The difference from the Basic Version of K-neighbor API is that:</p><ul><li>It supports counting the number of neighbors only.</li><li>It supports filtering edges based on their properties.</li><li>It supports returning the shortest path to reach the neighbors.</li></ul></blockquote><h6 id=params-3>Params</h6><ul><li>source: Starting vertex ID, required.</li><li>steps: Steps from the starting point, required, with the following structure:<ul><li>direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.</li><li>edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.<ul><li>label: Edge types.</li><li>properties: Filter edges based on property values.</li></ul></li><li>vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.<ul><li>label: Vertex types.</li><li>properties: Filter vertices based on property values.</li></ul></li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported &ldquo;degree.&rdquo; Starting from version 0.12, it is unified as &ldquo;max_degree&rdquo; and is backward compatible with the &ldquo;degree&rdquo; notation.)</li><li>skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint <code>skip_degree >= max_degree</code>. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)</li></ul></li><li>max_depth: Number of steps, required.</li><li>count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.</li><li>with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.</li><li>with_edge: Optional parameter, default is false:<ul><li>When true, the result will include complete edge information (all edges in the path):<ul><li>When with_path is true, it returns complete information of all edges in all paths.</li><li>When with_path is false, no information is returned.</li></ul></li><li>When false, it only returns edge IDs.</li></ul></li><li>with_vertex: Optional parameter, default is false:<ul><li>When true, the result will include complete vertex information (all vertices in the path):<ul><li>When with_path is true, it returns complete information of all vertices in all paths.</li><li>When with_path is false, it returns complete information of all neighbors.</li></ul></li><li>When false, it only returns vertex IDs.</li></ul></li><li>limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.</li></ul><h5 id=3242-usage-method>3.2.4.2 Usage Method</h5><h6 id=method--url-3>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
</span></span></code></pre></div><h6 id=request-body-1>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;steps&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;BOTH&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edge_steps&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;P.gt(0.1)&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;P.gt(0.1)&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertex_steps&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;P.lt(32)&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_depth&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nearest&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_edge&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-3>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-3>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;kneighbor&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:peter&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>35</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:josh&gt;2&gt;&gt;S2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;20130220&gt;S1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20130220&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:peter&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20170324&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3243-use-cases>3.2.4.3 Use Cases</h5><p>See 3.2.3.3</p><h4 id=325-same-neighbors>3.2.5 Same Neighbors</h4><h5 id=3251-function-introduction>3.2.5.1 Function Introduction</h5><p>Retrieve the common neighbors of two vertices.</p><h6 id=params-4>Params</h6><ul><li>vertex: ID of one vertex, required.</li><li>other: ID of another vertex, required.</li><li>direction: Direction in which the vertex expands outward (OUT, IN, BOTH). Optional, default is BOTH.</li><li>label: Edge type. Optional, default represents all edge labels.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li><li>limit: Maximum number of common neighbors to be returned. Optional, default is 10000000.</li></ul><h5 id=3252-usage-method>3.2.5.2 Usage Method</h5><h6 id=method--url-4>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&amp;other=&#34;1:josh&#34;
</span></span></code></pre></div><h6 id=response-status-4>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-4>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;same_neighbors&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3253-use-cases>3.2.5.3 Use Cases</h5><p>Find the common neighbors of two vertices:</p><ul><li>In a social network, find the common followers or users both users are following.</li></ul><h4 id=326-jaccard-similarity-get>3.2.6 Jaccard Similarity (GET)</h4><h5 id=3261-function-introduction>3.2.6.1 Function Introduction</h5><p>Compute the Jaccard similarity between two vertices (the intersection of the neighbors of the two vertices divided by the union of the neighbors of the two vertices).</p><h6 id=params-5>Params</h6><ul><li>vertex: ID of one vertex, required.</li><li>other: ID of another vertex, required.</li><li>direction: Direction in which the vertex expands outward (OUT, IN, BOTH). Optional, default is BOTH.</li><li>label: Edge type. Optional, default represents all edge labels.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li></ul><h5 id=3262-usage-method>3.2.6.2 Usage Method</h5><h6 id=method--url-5>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/jaccardsimilarity?vertex=&#34;1:marko&#34;&amp;other=&#34;1:josh&#34;
</span></span></code></pre></div><h6 id=response-status-5>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-5>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;jaccard_similarity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.2</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3263-use-cases>3.2.6.3 Use Cases</h5><p>Used to evaluate the similarity or closeness between two vertices.</p><h4 id=327-jaccard-similarity-post>3.2.7 Jaccard Similarity (POST)</h4><h5 id=3271-function-introduction>3.2.7.1 Function Introduction</h5><p>Compute the N vertices with the highest Jaccard similarity to a specified vertex.</p><blockquote><p>The Jaccard similarity is calculated as the intersection of the neighbors of the two vertices divided by the union of the neighbors of the two vertices.</p></blockquote><h6 id=params-6>Params</h6><ul><li>vertex: ID of a vertex, required.</li><li>Steps from the starting point, required. The structure is as follows:<ul><li>direction: Direction of the edges (OUT, IN, BOTH). Optional, default is BOTH.</li><li>labels: List of edge types.</li><li>properties: Filter edges based on property values.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Prior to version 0.12, the parameter name inside &ldquo;step&rdquo; was &ldquo;degree&rdquo;. Starting from version 0.12, it is unified as &ldquo;max_degree&rdquo; and still compatible with &ldquo;degree&rdquo; notation.)</li><li>skip_degree: Used to set the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional, default is 0 (not enabled), which means no skipping. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it after understanding and confirming.)</li></ul></li><li>top: Return the top N vertices with the highest Jaccard similarity for a starting vertex. Optional, default is 100.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li></ul><h5 id=3272-usage-method>3.2.7.2 Usage Method</h5><h6 id=method--url-6>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/jaccardsimilarity
</span></span></code></pre></div><h6 id=request-body-2>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;step&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;BOTH&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;top&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-6>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-6>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.3333333333333333</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.3333333333333333</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.2</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3273-use-cases>3.2.7.3 Use Cases</h5><p>Used to find the vertices in the graph that have the highest similarity to a specified vertex.</p><h4 id=328-shortest-path>3.2.8 Shortest Path</h4><h5 id=3281-function-introduction>3.2.8.1 Function Introduction</h5><p>Find the shortest path between a starting vertex and a target vertex based on the direction, edge type (optional), and maximum depth.</p><h6 id=params-7>Params</h6><ul><li>source: ID of the starting vertex, required.</li><li>target: ID of the target vertex, required.</li><li>direction: Direction in which the starting vertex expands (OUT, IN, BOTH). Optional, default is BOTH.</li><li>max_depth: Maximum number of steps, required.</li><li>label: Edge type, optional. Default represents all edge labels.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li><li>skip_degree: Used to set the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional, default is 0 (not enabled), which means no skipping. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it after understanding and confirming.)</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li></ul><h5 id=3282-usage-method>3.2.8.2 Usage Method</h5><h6 id=method--url-7>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/shortestpath?source=&#34;1:marko&#34;&amp;target=&#34;2:ripple&#34;&amp;max_depth=3
</span></span></code></pre></div><h6 id=response-status-7>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-7>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3283-use-cases>3.2.8.3 Use Cases</h5><p>Used to find the shortest path between two vertices, for example:</p><ul><li>In a social network, finding the shortest path between two users, representing the closest friend relationship chain.</li><li>In a device association network, finding the shortest association relationship between two devices.</li></ul><h4 id=329-all-shortest-paths>3.2.9 All Shortest Paths</h4><h5 id=3291-function-introduction>3.2.9.1 Function Introduction</h5><p>Find all shortest paths between a starting vertex and a target vertex based on the direction, edge type (optional), and maximum depth.</p><h6 id=params-8>Params</h6><ul><li>source: ID of the starting vertex, required.</li><li>target: ID of the target vertex, required.</li><li>direction: Direction in which the starting vertex expands (OUT, IN, BOTH). Optional, default is BOTH.</li><li>max_depth: Maximum number of steps, required.</li><li>label: Edge type, optional. Default represents all edge labels.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li><li>skip_degree: Used to set the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional, default is 0 (not enabled), which means no skipping. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it after understanding and confirming.)</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li></ul><h5 id=3292-usage-method>3.2.9.2 Usage Method</h5><h6 id=method--url-8>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/allshortestpaths?source=&#34;A&#34;&amp;target=&#34;Z&#34;&amp;max_depth=10
</span></span></code></pre></div><h6 id=response-status-8>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-8>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;A&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;B&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;C&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;Z&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;A&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;M&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;N&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;Z&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=3293-use-cases>3.2.9.3 Use Cases</h5><p>Used to find all shortest paths between two vertices, for example:</p><ul><li>In a social network, finding all shortest paths between two users, representing all the closest friend relationship chains.</li><li>In a device association network, finding all shortest association relationships between two devices.</li></ul><h4 id=3210-weighted-shortest-path>3.2.10 Weighted Shortest Path</h4><h5 id=32101-function-introduction>3.2.10.1 Function Introduction</h5><p>Find a weighted shortest path between a starting vertex and a target vertex based on the direction, edge type (optional), maximum depth, and edge weight property.</p><h6 id=params-9>Params</h6><ul><li>source: ID of the starting vertex, required.</li><li>target: ID of the target vertex, required.</li><li>direction: Direction in which the starting vertex expands (OUT, IN, BOTH). Optional, default is BOTH.</li><li>label: Edge type, optional. Default represents all edge labels.</li><li>weight: Edge weight property, required. It must be a numeric property.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li><li>skip_degree: Used to set the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional, default is 0 (not enabled), which means no skipping. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it after understanding and confirming.)</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>with_vertex: true to include complete vertex information (all vertices in the path) in the result, false to only return vertex IDs. Optional, default is false.</li></ul><h5 id=32102-usage-method>3.2.10.2 Usage Method</h5><h6 id=method--url-9>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/weightedshortestpath?source=&#34;1:marko&#34;&amp;target=&#34;2:ripple&#34;&amp;weight=&#34;weight&#34;&amp;with_vertex=true
</span></span></code></pre></div><h6 id=response-status-9>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-9>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32103-use-cases>3.2.10.3 Use Cases</h5><p>Used to find the weighted shortest path between two vertices, for example:</p><ul><li>In a transportation network, finding the transportation method that requires the least cost from city A to city B.</li></ul><h4 id=3211-single-source-shortest-path>3.2.11 Single Source Shortest Path</h4><h5 id=32111-function-introduction>3.2.11.1 Function Introduction</h5><p>Starting from a vertex, find the shortest paths from that vertex to other vertices in the graph (optional with weight).</p><h6 id=params-10>Params</h6><ul><li>source: ID of the starting vertex, required.</li><li>direction: Direction in which the starting vertex expands (OUT, IN, BOTH). Optional, default is BOTH.</li><li>label: Edge type, optional. Default represents all edge labels.</li><li>weight: Edge weight property, optional. It must be a numeric property. If not provided or the edges don&rsquo;t have this property, the weight is considered as 1.0.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li><li>skip_degree: Used to set the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional, default is 0 (not enabled), which means no skipping. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it after understanding and confirming.)</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>limit: Number of target vertices to be queried and the number of shortest paths to be returned. Optional, default is 10.</li><li>with_vertex: true to include complete vertex information (all vertices in the path) in the result, false to only return vertex IDs. Optional, default is false.</li></ul><h5 id=32112-usage-method>3.2.11.2 Usage Method</h5><h6 id=method--url-10>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/singlesourceshortestpath?source=&#34;1:marko&#34;&amp;with_vertex=true
</span></span></code></pre></div><h6 id=response-status-10>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-10>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:peter&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>27</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>35</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32113-use-cases>3.2.11.3 Use Cases</h5><p>Used to find the weighted shortest path from one vertex to other vertices, for example:</p><ul><li>Finding the shortest travel time by bus from Beijing to all other cities in the country.</li></ul><h4 id=3212-multi-node-shortest-path>3.2.12 Multi Node Shortest Path</h4><h5 id=32121-function-introduction>3.2.12.1 Function Introduction</h5><p>Finds the shortest paths between pairs of specified vertices.</p><h6 id=params-11>Params</h6><ul><li>vertices: Defines the starting vertices, required. It can be specified in the following ways:<ul><li>ids: Provide a list of vertex IDs as starting vertices.</li><li>label and properties: If no IDs are specified, use the combined conditions of label and properties to query the starting vertices.<ul><li>label: Vertex type.</li><li>properties: Query the starting vertices based on property values.</li></ul><blockquote><p>Note: Property values in properties can be a list, indicating that the value of the key can be any value in the list.</p></blockquote></li></ul></li><li>step: Represents the path from the starting vertices to the destination vertices, required. The structure of the step is as follows:<ul><li>direction: Represents the direction of the edges (OUT, IN, BOTH). Default is BOTH.</li><li>labels: List of edge types.</li><li>properties: Filters the edges based on property values.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the step only supported &ldquo;degree&rdquo; as the parameter name. Starting from version 0.12, &ldquo;max_degree&rdquo; is used uniformly, and &ldquo;degree&rdquo; is still supported for backward compatibility.)</li><li>skip_degree: Used to set the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional, default is 0 (not enabled), which means no skipping. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it after understanding and confirming.)</li></ul></li><li>max_depth: Number of steps, required.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>with_vertex: true to include complete vertex information (all vertices in the path) in the result, false to only return vertex IDs. Optional, default is false.</li></ul><h5 id=32122-usage-method>3.2.12.2 Usage Method</h5><h6 id=method--url-11>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/multinodeshortestpath
</span></span></code></pre></div><h6 id=request-body-3>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;382:vadas&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;382:peter&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;383:ripple&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;step&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;BOTH&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_depth&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-11>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-11>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;383:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;382:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;383:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;382:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;382:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;382:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>27</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;383:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32123-use-cases>3.2.12.3 Use Cases</h5><p>Used to find the shortest paths between multiple vertices, for example:</p><ul><li>Finding the shortest paths between multiple companies and their legal representatives.</li></ul><h4 id=3213-paths-get-basic-version>3.2.13 Paths (GET, Basic Version)</h4><h5 id=32131-function-introduction>3.2.13.1 Function Introduction</h5><p>Finds all paths based on conditions such as the starting vertex, destination vertex, direction, edge types (optional), and maximum depth.</p><h6 id=params-12>Params</h6><ul><li>source: ID of the starting vertex, required.</li><li>target: ID of the destination vertex, required.</li><li>direction: Direction in which the starting vertex expands (OUT, IN, BOTH). Optional, default is BOTH.</li><li>label: Edge type. Optional, default represents all edge labels.</li><li>max_depth: Number of steps, required.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>limit: Maximum number of paths to be returned. Optional, default is 10.</li></ul><h5 id=32132-usage-method>3.2.13.2 Usage Method</h5><h6 id=method--url-12>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/paths?source=&#34;1:marko&#34;&amp;target=&#34;1:josh&#34;&amp;max_depth=5
</span></span></code></pre></div><h6 id=response-status-12>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-12>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32133-use-cases>3.2.13.3 Use Cases</h5><p>Used to find all paths between two vertices, for example:</p><ul><li>In a social network, finding all possible relationship paths between two users.</li><li>In a device association network, finding all associated paths between two devices.</li></ul><h4 id=3214-paths-post-advanced-version>3.2.14 Paths (POST, Advanced Version)</h4><h5 id=32141-function-introduction>3.2.14.1 Function Introduction</h5><p>Finds all paths based on conditions such as the starting vertex, destination vertex, steps (step), and maximum depth.</p><h6 id=params-13>Params</h6><ul><li>sources: Defines the starting vertices, required. The specification methods include:<ul><li>ids: Provide the starting vertices through a list of vertex IDs.</li><li>label and properties: If no IDs are specified, use the label and properties as combined conditions to query the starting vertices.<ul><li>label: Vertex type.</li><li>properties: Query the starting vertices based on the values of their properties.</li></ul><blockquote><p>Note: The property values in properties can be a list, indicating that any value corresponding to the key is acceptable.</p></blockquote></li></ul></li><li>targets: Defines the destination vertices, required. The specification methods include:<ul><li>ids: Provide the destination vertices through a list of vertex IDs.</li><li>label and properties: If no IDs are specified, use the label and properties as combined conditions to query the destination vertices.<ul><li>label: Vertex type.</li><li>properties: Query the destination vertices based on the values of their properties.</li></ul><blockquote><p>Note: The property values in properties can be a list, indicating that any value corresponding to the key is acceptable.</p></blockquote></li></ul></li><li>step: Represents the path from the starting vertex to the destination vertex, required. The structure of Step is as follows:<ul><li>direction: Represents the direction of edges (OUT, IN, BOTH). The default is BOTH.</li><li>labels: List of edge types.</li><li>properties: Filters edges based on property values.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Prior to version 0.12, step only supported degree as a parameter name. Starting from version 0.12, max_degree is used uniformly and degree writing is backward compatible.)</li><li>skip_degree: Used to set the minimum number of edges to be discarded for super vertices during the query process. When the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely discarded. Optional, if enabled, it must satisfy the constraint <code>skip_degree >= max_degree</code>. Default is 0 (not enabled), which means no points are skipped. (Note: When this configuration is enabled, the traversal will attempt to visit skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please make sure to understand before enabling it.)</li></ul></li><li>max_depth: Number of steps, required.</li><li>nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest path and can have cycles). Optional, default is true.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>limit: Maximum number of paths to be returned. Optional, default is 10.</li><li>with_vertex: When true, the results include complete vertex information (all vertices in the path). When false, only the vertex IDs are returned. Optional, default is false.</li></ul><h5 id=32142-usage-method>3.2.14.2 Usage Method</h5><h6 id=method--url-13>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/paths
</span></span></code></pre></div><h6 id=request-body-4>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;sources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;targets&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;step&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;BOTH&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;P.gt(0.01)&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;max_depth&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-13>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-13>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:peter&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:peter&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32143-use-cases>3.2.14.3 Use Cases</h5><p>Used to find all paths between two vertices, for example:</p><ul><li>In a social network, finding all possible relationship paths between two users.</li><li>In a device association network, finding all associated paths between two devices.</li></ul><h4 id=3215-customized-paths>3.2.15 Customized Paths</h4><h5 id=32151-function-introduction>3.2.15.1 Function Introduction</h5><p>Finds all paths that meet the specified conditions based on a batch of starting vertices, edge rules (including direction, edge types, and property filters), and maximum depth.</p><h6 id=params-14>Params</h6><ul><li>sources: Defines the starting vertices, required. The specification methods include:<ul><li>ids: Provide the starting vertices through a list of vertex IDs.</li><li>label and properties: If no IDs are specified, use the label and properties as combined conditions to query the starting vertices.<ul><li>label: Vertex type.</li><li>properties: Query the starting vertices based on the values of their properties.</li></ul><blockquote><p>Note: The property values in properties can be a list, indicating that any value corresponding to the key is acceptable.</p></blockquote></li></ul></li><li>steps: Represents the path rules traversed from the starting vertices and is a list of Steps. Required. The structure of each Step is as follows:<ul><li>direction: Represents the direction of edges (OUT, IN, BOTH). The default is BOTH.</li><li>labels: List of edge types.</li><li>properties: Filters edges based on property values.</li><li>weight_by: Calculates the weight of edges based on the specified property. It is effective when sort_by is not NONE and is mutually exclusive with default_weight.</li><li>default_weight: The default weight to be used when there is no property to calculate the weight of edges. It is effective when sort_by is not NONE and is mutually exclusive with weight_by.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Prior to version 0.12, step only supported degree as a parameter name. Starting from version 0.12, max_degree is used uniformly and degree writing is backward compatible.)</li><li>sample: Used when sampling is needed for the edges that meet the conditions of a specific step. -1 means no sampling, and the default is to sample 100 edges.</li></ul></li><li>sort_by: Sorts the paths based on their weights. Optional, default is NONE:<ul><li>NONE: No sorting, default value.</li><li>INCR: Sorts in ascending order based on path weights.</li><li>DECR: Sorts in descending order based on path weights.</li></ul></li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>limit: Maximum number of paths to be returned. Optional, default is 10.</li><li>with_vertex: When true, the results include complete vertex information (all vertices in the path). When false, only the vertex IDs are returned. Optional, default is false.</li></ul><h5 id=32152-usage-method>3.2.15.2 Usage Method</h5><h6 id=method--url-14>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/customizedpaths
</span></span></code></pre></div><h6 id=request-body-5>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sources&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;steps&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;knows&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight_by&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;weight&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;created&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;default_weight&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sample&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sort_by&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;INCR&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;capacity&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-14>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-14>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weights&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#0000cf;font-weight:700>8</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>32</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32153-use-cases>3.2.15.3 Use Cases</h5><p>Suitable for finding various complex sets of paths, for example:</p><ul><li>In a social network, finding the paths from users who have watched movies directed by Zhang Yimou to the influencers they follow (Zhang Yimou &mdash;> Movie &mdash;> User &mdash;> Influencer).</li><li>In a risk control network, finding the paths from multiple high-risk users to the friends of their direct relatives (High-risk user &mdash;> Direct relative &mdash;> Friend).</li></ul><h4 id=3216-template-paths>3.2.16 Template Paths</h4><h5 id=32161-function-introduction>3.2.16.1 Function Introduction</h5><p>Finds all paths that meet the specified conditions based on a batch of starting vertices, edge rules (including direction, edge types, and property filters), and maximum depth.</p><h6 id=params-15>Params</h6><ul><li>sources: Defines the starting vertices, required. The specification methods include:<ul><li>ids: Provide the starting vertices through a list of vertex IDs.</li><li>label and properties: If no IDs are specified, use the label and properties as combined conditions to query the starting vertices.<ul><li>label: Vertex type.</li><li>properties: Query the starting vertices based on the values of their properties.</li></ul><blockquote><p>Note: The property values in properties can be a list, indicating that any value corresponding to the key is acceptable.</p></blockquote></li></ul></li><li>targets: Defines the ending vertices, required. The specification methods include:<ul><li>ids: Provide the ending vertices through a list of vertex IDs.</li><li>label and properties: If no IDs are specified, use the label and properties as combined conditions to query the ending vertices.<ul><li>label: Vertex type.</li><li>properties: Query the ending vertices based on the values of their properties.</li></ul><blockquote><p>Note: The property values in properties can be a list, indicating that any value corresponding to the key is acceptable.</p></blockquote></li></ul></li><li>steps: Represents the path rules traversed from the starting vertices and is a list of Steps. Required. The structure of each Step is as follows:<ul><li>direction: Represents the direction of edges (OUT, IN, BOTH). The default is BOTH.</li><li>labels: List of edge types.</li><li>properties: Filters edges based on property values.</li><li>max_times: The number of times the current step can be repeated. When set to N, it means the starting vertices can pass through the current step 1-N times.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Prior to version 0.12, step only supported degree as a parameter name. Starting from version 0.12, max_degree is used uniformly and degree writing is backward compatible.)</li><li>skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges of a vertex is greater than skip_degree, the vertex is completely discarded. Optional. If enabled, it must satisfy the <code>skip_degree >= max_degree</code> constraint. Default is 0 (not enabled), which means no points are skipped. (Note: After enabling this configuration, traversing will attempt to access a vertex&rsquo;s skip_degree edges, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please ensure understanding before enabling.)</li></ul></li><li>with_ring: Boolean value, true to include cycles; false to exclude cycles. Default is false.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>limit: Maximum number of paths to be returned. Optional, default is 10.</li><li>with_vertex: When true, the results include complete vertex information (all vertices in the path). When false, only the vertex IDs are returned. Optional, default is</li></ul><p>false.</p><h5 id=32162-usage-method>3.2.16.2 Usage Method</h5><h6 id=method--url-15>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/templatepaths
</span></span></code></pre></div><h6 id=request-body-6>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;targets&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;steps&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;IN&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;IN&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;skip_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>100000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-15>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-15>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>32</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>27</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Hongkong&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32163-use-cases>3.2.16.3 Use Cases</h5><p>Suitable for finding various complex template paths, such as personA -(Friend)-> personB -(Classmate)-> personC, where the &ldquo;Friend&rdquo; and &ldquo;Classmate&rdquo; edges can have a maximum depth of 3 and 4 layers, respectively.</p><h4 id=3217-crosspoints>3.2.17 Crosspoints</h4><h5 id=32171-function-introduction>3.2.17.1 Function Introduction</h5><p>Finds the intersection points based on the specified conditions, including starting vertices, destination vertices, direction, edge types (optional), and maximum depth.</p><h6 id=params-16>Params</h6><ul><li>source: ID of the starting vertex, required.</li><li>target: ID of the destination vertex, required.</li><li>direction: The direction from the starting vertex to the destination vertex. The reverse direction is used from the destination vertex to the starting vertex. When set to BOTH, the direction is not considered (OUT, IN, BOTH). Optional, default is BOTH.</li><li>label: Edge type, optional. Default represents all edge labels.</li><li>max_depth: Number of steps, required.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional, default is 10000000.</li><li>limit: Maximum number of intersection points to be returned. Optional, default is 10.</li></ul><h5 id=32172-usage-method>3.2.17.2 Usage Method</h5><h6 id=method--url-16>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/crosspoints?source=&#34;2:lop&#34;&amp;target=&#34;2:ripple&#34;&amp;max_depth=5&amp;direction=IN
</span></span></code></pre></div><h6 id=response-status-16>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-16>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;crosspoints&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;crosspoint&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32173-use-cases>3.2.17.3 Use Cases</h5><p>Used to find the intersection points and their paths between two vertices, such as:</p><ul><li>In a social network, finding the topics or influencers that two users have in common.</li><li>In a family relationship, finding common ancestors.</li></ul><h4 id=3218-customized-crosspoints>3.2.18 Customized Crosspoints</h4><h5 id=32181-function-introduction>3.2.18.1 Function Introduction</h5><p>Finds the intersection of destination vertices that satisfy the specified conditions, including starting vertices, multiple edge rules (including direction, edge type, and property filters), and maximum depth.</p><h6 id=params-17>Params</h6><ul><li><p>sources: Defines the starting vertices, required. The specified options include:</p><ul><li>ids: Provides a list of vertex IDs as starting vertices.</li><li>label and properties: If no IDs are specified, uses the combined conditions of label and properties to query the starting vertices.<ul><li>label: Type of the vertex.</li><li>properties: Queries the starting vertices based on property values.</li></ul><blockquote><p>Note: Property values in properties can be a list, indicating that the value of the key can be any item in the list.</p></blockquote></li></ul></li><li><p>path_patterns: Represents the path rules to be followed from the starting vertices. It is a list of rules. Required. Each rule is a PathPattern.</p><ul><li>Each PathPattern consists of a list of steps, where each step has the following structure:<ul><li>direction: Indicates the direction of the edge (OUT, IN, BOTH). Default is BOTH.</li><li>labels: List of edge types.</li><li>properties: Filters the edges based on property values.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000.</li><li>skip_degree: Sets the minimum number of edges to discard super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely discarded. Optional. If enabled, it must satisfy the constraint <code>skip_degree >= max_degree</code>. Default is 0 (not enabled), which means no vertices are skipped. Note: When this configuration is enabled, the traversal process will attempt to visit skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure you understand it before enabling.</li></ul></li></ul></li><li><p>capacity: Maximum number of vertices to be visited during the traversal process. Optional. Default is 10000000.</p></li><li><p>limit: Maximum number of paths to be returned. Optional. Default is 10.</p></li><li><p>with_path: When set to true, returns the paths where the intersection points are located. When set to false, does not return the paths. Optional. Default is false.</p></li><li><p>with_vertex: Optional. Default is false.</p><ul><li>When set to true, the result includes complete vertex information (all vertices in the paths):<ul><li>When with_path is true, it returns complete information of all vertices in the paths.</li><li>When with_path is false, it returns complete information of all intersection points.</li></ul></li><li>When set to false, only the vertex IDs are returned.</li></ul></li></ul><h5 id=32182-usage-method>3.2.18.2 Usage Method</h5><h6 id=method--url-17>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/{graph}/traversers/customizedcrosspoints
</span></span></code></pre></div><h6 id=request-body-7>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sources&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path_patterns&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;steps&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;IN&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;created&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_path&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;capacity&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-17>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-17>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;crosspoints&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;paths&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&gt;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&gt;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>32</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32183-use-cases>3.2.18.3 Use Cases</h5><p>Used to query a group of vertices that have intersections at the destination through multiple paths. For example:</p><ul><li>In a product knowledge graph, multiple models of smartphones, learning devices, and gaming devices belong to the top-level category of electronic devices through different lower-level category paths.</li></ul><h4 id=3219-rings>3.2.19 Rings</h4><h5 id=32191-function-introduction>3.2.19.1 Function Introduction</h5><p>Finds reachable cycles based on the specified conditions, including starting vertices, direction, edge types (optional), and maximum depth.</p><p>For example: 1 -> 25 -> 775 -> 14690 -> 25, where the cycle is 25 -> 775 -> 14690 -> 25.</p><h6 id=params-18>Params</h6><ul><li>source: Starting vertex ID, required.</li><li>direction: Direction of edges emitted from the starting vertex (OUT, IN, BOTH). Optional. Default is BOTH.</li><li>label: Edge type. Optional. Default represents all edge labels.</li><li>max_depth: Number of steps. Required.</li><li>source_in_ring: Whether the starting point is included in the cycle. Optional. Default is true.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional. Default is 10000.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional. Default is 10000000.</li><li>limit: Maximum number of reachable cycles to be returned. Optional. Default is 10.</li></ul><h5 id=32192-usage-method>3.2.19.2 Usage Method</h5><h6 id=method--url-18>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/rings?source=&#34;1:marko&#34;&amp;max_depth=2
</span></span></code></pre></div><h6 id=response-status-18>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-18>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rings&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32193-use-cases>3.2.19.3 Use Cases</h5><p>Used to query cycles reachable from the starting vertex, for example:</p><ul><li>In a risk control project, querying individuals or devices involved in a circular guarantee that a user is connected to.</li><li>In a device network, discovering devices that have circular references around a specific device.</li></ul><h4 id=3220-rays>3.2.20 Rays</h4><h5 id=32201-function-introduction>3.2.20.1 Function Introduction</h5><p>Finds paths that diverge from the starting vertex and reach boundary vertices based on the specified conditions, including starting vertices, direction, edge types (optional), and maximum depth.</p><p>For example: 1 -> 25 -> 775 -> 14690 -> 2289 -> 18379, where 18379 is the boundary vertex, meaning there are no edges emitted from 18379.</p><h6 id=params-19>Params</h6><ul><li>source: Starting vertex ID, required.</li><li>direction: Direction of edges emitted from the starting vertex (OUT, IN, BOTH). Optional. Default is BOTH.</li><li>label: Edge type. Optional. Default represents all edge labels.</li><li>max_depth: Number of steps. Required.</li><li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional. Default is 10000.</li><li>capacity: Maximum number of vertices to be visited during the traversal process. Optional. Default is 10000000.</li><li>limit: Maximum number of non-cycle paths to be returned. Optional. Default is 10.</li></ul><h5 id=32202-usage-method>3.2.20.2 Usage Method</h5><h6 id=method--url-19>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/traversers/rays?source=&#34;1:marko&#34;&amp;max_depth=2&amp;direction=OUT
</span></span></code></pre></div><h6 id=response-status-19>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-19>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rays&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;objects&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;2:lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32203-use-cases>3.2.20.3 Use Cases</h5><p>Used to find paths from the starting vertex to boundary vertices based on a specific relationship, for example:</p><ul><li>In a family relationship, finding paths from a person to all descendants who do not have children.</li><li>In a device network, discovering paths from a specific device to terminal devices.</li></ul><h4 id=3221-fusiform-similarity>3.2.21 Fusiform Similarity</h4><h5 id=32211-function-introduction>3.2.21.1 Function Introduction</h5><p>Queries a batch of &ldquo;fusiform similar vertices&rdquo; based on specified conditions. When two vertices share a certain relationship with many common vertices, they are considered &ldquo;fusiform similar vertices.&rdquo; For example, if &ldquo;Reader A&rdquo; has read 100 books, readers who have read 80 or more of these 100 books can be defined as &ldquo;fusiform similar vertices&rdquo; of &ldquo;Reader A.&rdquo;</p><h6 id=params-20>Params</h6><ul><li><p>sources: Starting vertices, required. Specify using:</p><ul><li>ids: Provide a list of vertex IDs as starting vertices.</li><li>label and properties: If ids are not specified, use the combined conditions of label and properties to query the starting vertices.<ul><li>label: Vertex type.</li><li>properties: Query the starting vertices based on the values of their properties.</li></ul><blockquote><p>Note: Property values in properties can be a list, indicating that the value of the key can be any value in the list.</p></blockquote></li></ul></li><li><p>label: Edge type. Optional. Default represents all edge labels.</p></li><li><p>direction: Direction in which the starting vertex diverges (OUT, IN, BOTH). Optional. Default is BOTH.</p></li><li><p>min_neighbors: Minimum number of neighbors. If the number of neighbors is less than this threshold, the starting vertex is not considered a &ldquo;fusiform similar vertex.&rdquo; For example, if you want to find &ldquo;fusiform similar vertices&rdquo; of books read by &ldquo;Reader A,&rdquo; and min_neighbors is set to 100, it means that &ldquo;Reader A&rdquo; must have read at least 100 books to have &ldquo;fusiform similar vertices.&rdquo; Required.</p></li><li><p>alpha: Similarity, representing the proportion of common neighbors between the starting vertex and &ldquo;fusiform similar vertices&rdquo; to all neighbors of the starting vertex. Required.</p></li><li><p>min_similars: Minimum number of &ldquo;fusiform similar vertices.&rdquo; Only when the number of &ldquo;fusiform similar vertices&rdquo; of the starting vertex is greater than or equal to this value, the starting vertex and its &ldquo;fusiform similar vertices&rdquo; will be returned. Optional. Default is 1.</p></li><li><p>top: Returns the top highest similarity &ldquo;fusiform similar vertices&rdquo; of a starting vertex. Required. 0 means all.</p></li><li><p>group_property: Used together with min_groups. Returns the starting vertex and its &ldquo;fusiform similar vertices&rdquo; only if there are at least min_groups different values for a certain attribute of the starting vertex and its &ldquo;fusiform similar vertices.&rdquo; For example, when recommending &ldquo;out-of-town&rdquo; book buddies for &ldquo;Reader A,&rdquo; set group_property to the &ldquo;city&rdquo; attribute of readers and min_group to at least 2. Optional. If not specified, no filtering based on attributes is needed.</p></li><li><p>min_groups: Used together with group_property. Only meaningful when group_property is set.</p></li><li><p>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional. Default is 10000.</p></li><li><p>capacity: Maximum number of vertices to be visited during the traversal process. Optional. Default is 10000000.</p></li><li><p>limit: Maximum number of results to be returned (one starting vertex and its &ldquo;fusiform similar vertices&rdquo; count as one result). Optional. Default is 10.</p></li><li><p>with_intermediary: Whether to return the starting vertex and the intermediate vertices that are commonly related to the &ldquo;fusiform</p></li></ul><p>similar vertices.&rdquo; Default is false.</p><ul><li>with_vertex: Optional. Default is false.<ul><li>true: Returns complete vertex information in the results.</li><li>false: Only returns vertex IDs.</li></ul></li></ul><h5 id=32212-usage-method>3.2.21.2 Usage Method</h5><h6 id=method--url-20>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/traversers/fusiformsimilarity
</span></span></code></pre></div><h6 id=request-body-8>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sources&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ids&#34;</span><span style=color:#000;font-weight:700>:[],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;p1&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;read&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min_neighbors&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;alpha&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>0.75</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min_similars&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;top&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_property&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min_group&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_intermediary&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_vertex&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-20>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-20>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;similars&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;3:p1&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3:p2&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;score&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.8888888888888888</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;intermediaries&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3:p3&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;score&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.7777777777777778</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;intermediaries&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3:p1&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;p1&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3:p2&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;p2&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Shanghai&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3:p3&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;p3&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32213-use-cases>3.2.21.3 Use Cases</h5><p>Used to query vertices that have high similarity with a group of vertices. For example:</p><ul><li>Readers with similar book lists to a specific reader.</li><li>Players who play similar games to a specific player.</li></ul><h4 id=3222-vertices>3.2.22 Vertices</h4><h5 id=32221-batch-query-vertices-by-vertex-ids>3.2.22.1 Batch Query Vertices by Vertex IDs</h5><h6 id=params-21>Params</h6><ul><li>ids: List of vertex IDs to be queried.</li></ul><h6 id=method--url-21>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/traversers/vertices?ids=&#34;1:marko&#34;&amp;ids=&#34;2:lop&#34;
</span></span></code></pre></div><h6 id=response-status-21>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-21>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32222-get-vertex-shard-information>3.2.22.2 Get Vertex Shard Information</h5><p>Obtain vertex shard information by specifying the shard size <code>split_size</code> (can be used in conjunction with Scan in 3.2.21.3 to retrieve vertices).</p><h6 id=params-22>Params</h6><ul><li>split_size: Shard size, required.</li></ul><h6 id=method--url-22>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/traversers/vertices/shards?split_size=67108864
</span></span></code></pre></div><h6 id=response-status-22>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-22>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;shards&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;0&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2165893&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2165893&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;4331786&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;4331786&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;6497679&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;6497679&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;8663572&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#a40000>......</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32223-batch-retrieve-vertices-based-on-shard-information>3.2.22.3 Batch Retrieve Vertices Based on Shard Information</h5><p>Retrieve vertices in batches based on the specified shard information (refer to 3.2.21.2 Shard for obtaining shard information).</p><h6 id=params-23>Params</h6><ul><li>start: Shard start position, required.</li><li>end: Shard end position, required.</li><li>page: Page position for pagination, optional. Default is null, no pagination. When page is &ldquo;&rdquo;, it represents the first page of pagination starting from the position indicated by start.</li><li>page_limit: The upper limit of the number of vertices per page when retrieving vertices with pagination, optional. Default is 100000.</li></ul><h6 id=method--url-23>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/traversers/vertices/scan?start=0&amp;end=4294967295
</span></span></code></pre></div><h6 id=response-status-23>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-23>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&gt;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>199</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;ripple&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&gt;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:vadas&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Hongkong&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:vadas&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vadas&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:vadas&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>27</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:peter&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Shanghai&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:peter&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;peter&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:peter&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>35</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;josh&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>32</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;price&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;price&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>328</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;lop&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;lang&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&gt;lang&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;java&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32224-use-cases>3.2.22.4 Use Cases</h5><ul><li>Querying vertices by ID list, which can be used for batch vertex queries. For example, after querying multiple paths in a path search, you can further query all vertex properties of a specific path.</li><li>Retrieving shards and querying vertices by shard, which can be used to traverse all vertices.</li></ul><h4 id=3223-edges>3.2.23 Edges</h4><h5 id=32231-batch-retrieve-edges-based-on-edge-ids>3.2.23.1 Batch Retrieve Edges Based on Edge IDs</h5><h6 id=params-24>Params</h6><ul><li>ids: List of edge IDs to be queried.</li></ul><h6 id=method--url-24>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/traversers/edges?ids=&#34;S1:josh&gt;1&gt;&gt;S2:lop&#34;&amp;ids=&#34;S1:josh&gt;1&gt;&gt;S2:ripple&#34;
</span></span></code></pre></div><h6 id=response-status-24>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-24>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:josh&gt;1&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20091111&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:josh&gt;1&gt;&gt;S2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32232-retrieve-edge-shard-information>3.2.23.2 Retrieve Edge Shard Information</h5><p>Retrieve shard information for edges by specifying the shard size (<code>split_size</code>). This can be used in conjunction with the Scan operation described in section 3.2.22.3 to retrieve edges.</p><h6 id=params-25>Params</h6><ul><li>split_size: Shard size, required field.</li></ul><h6 id=method--url-25>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/traversers/edges/shards?split_size=4294967295
</span></span></code></pre></div><h6 id=response-status-25>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-25>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;shards&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;0&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1073741823&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1073741823&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2147483646&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2147483646&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3221225469&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3221225469&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;4294967292&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;start&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;4294967292&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;end&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;4294967295&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;length&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32233-batch-retrieve-edges-based-on-shard-information>3.2.23.3 Batch Retrieve Edges Based on Shard Information</h5><p>Batch retrieve edges by specifying shard information (refer to section 3.2.22.2 for shard retrieval).</p><h6 id=params-26>Params</h6><ul><li>start: Shard starting position, required field.</li><li>end: Shard ending position, required field.</li><li>page: Page position for pagination, optional field. Default is null, which means no pagination. When <code>page</code> is empty, it indicates the first page of pagination starting from the position indicated by <code>start</code>.</li><li>page_limit: Upper limit of the number of edges per page for paginated retrieval, optional field. Default is 100000.</li></ul><h6 id=method--url-26>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/traversers/edges/scan?start=0&amp;end=3221225469
</span></span></code></pre></div><h6 id=response-status-26>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-26>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;S1:peter&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:peter&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>0.2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;20170324&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;S1:josh&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;20091111&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;S1:josh&gt;2&gt;&gt;S2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:ripple&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;20130220&gt;S1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:josh&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;20130220&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;S1:marko&gt;1&gt;20160110&gt;S1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:vadas&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>0.5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;20160110&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=32234-use-cases>3.2.23.4 Use Cases</h5><ul><li>Querying edges based on ID list, suitable for batch retrieval of edges.</li><li>Retrieving shard information and querying edges based on shards, useful for traversing all edges.</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-ced5167413a6606a537e40b18f6fec3e>5.1.10 - Rank API</h1><h3 id=41-rank-api-overview>4.1 Rank API overview</h3><p>Not only the Graph iteration (traverser) method, HugeGraph-Server also provide <code>Rank API</code> for recommendation purpose.
You can use it to recommend some vertexes much closer to a vertex.</p><h3 id=42-details-of-rank-api>4.2 Details of Rank API</h3><h4 id=421-personal-rank-api>4.2.1 Personal Rank API</h4><p>A typical scenario for <code>Personal Rank</code> algorithm is in recommendation application. According to the out edges of a vertex,
recommend some other vertices that having the same or similar edges.</p><p>Here is a use case:
According to someone&rsquo;s reading habit or reading history, we can recommend some books he may be interested or some book pal.</p><p>For Example:</p><ol><li>Suppose we have a vertex, Person type, and named tom.He like 5 books <code>a,b,c,d,e</code>. If we want to recommend some book pal and books for tom, an easier idea is let&rsquo;s check whoever also liked these books (common hobby based).</li><li>Now, we need someone else, like neo, he like three books <code>b,d,f</code>. And Jay, he like 4 books <code>c,d,e,g</code>, and Lee, he also like 4 books <code>a,d,e,f</code>.</li><li>For we don&rsquo;t need to recommend books tom already read, the recommend-list should only contain the books Tom&rsquo;s book pal already read but tom haven&rsquo;t read yet. Such as book &ldquo;f&rdquo; and &ldquo;g&rdquo;, and with priority f > g.</li><li>Now, we recompute Tom&rsquo;s personal rank value, we will get a sorted TopN book pal or book recommend-list. (Choose OTHER_LABEL,for Only Book purpose)</li></ol><h5 id=4210-data-preparation>4.2.1.0 Data Preparation</h5><p>The case above is simple. Here we also provide a public test dataset <a href=https://grouplens.org/datasets/movielens/>MovieLens</a> for use case.
You should download the dataset. The load it into HugeGraph with HugeGraph-Loader. To make it simple, we ignore all properties data of user and move. only field id is enough. we also ignore the value of edge rating.</p><p>The metadata for input file and mapping file as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#8f5902;font-style:italic>////////////////////////////////////////////////////////////
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// UserID::Gender::Age::Occupation::Zip-code
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// MovieID::Title::Genres
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// UserID::MovieID::Rating::Timestamp
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>////////////////////////////////////////////////////////////
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Define schema
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;rate&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;user&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;rating&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;user&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;rate&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;vertices&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;user&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;users.dat&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;::&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;UserID&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Gender&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Age&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Occupation&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Zip-code&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;Gender&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Age&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Occupation&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Zip-code&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;UserID&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;id&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;movies.dat&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;::&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;MovieID&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Title&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Genres&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;Title&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Genres&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MovieID&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;id&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;edges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;rating&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;UserID&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;MovieID&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;file&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;path&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ratings.dat&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;format&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;TEXT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;delimiter&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;::&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;header&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;UserID&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;MovieID&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Rating&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Timestamp&#34;</span><span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ignored&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span><span style=color:#4e9a06>&#34;Timestamp&#34;</span><span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mapping&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;UserID&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MovieID&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;Rating&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;rate&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><blockquote><p>Note: modify the <code>input.path</code> to your local path.</p></blockquote><h5 id=4211-function-introduction>4.2.1.1 Function Introduction</h5><p>suitable for bipartite graph, will return all vertex or a list of its correlation which related to all source vertex.</p><blockquote><p>Bipartite Graph is a special model in Graph Theory, as well as a special flow in network. The strongest feature is, it split all vertex in graph into two sets. The vertex in the set is not connected. However,the vertex in two sets may connect with each other.</p></blockquote><p>Suppose we have one bipartite graph based on user and things.
A random walk based PersonalRank algorithm should be likes this:</p><ol><li>Choose a user u as start vertex, let&rsquo;s set the initial weight to be 1.0 . Go from Vu with probability alpha to a neighbor vertex, and (1-alpha) to stay.</li><li>If we decide to go outside, we would like to choose an edge, such as <code>rating</code>, to find a common judge.<ol><li>Then choose the neighbors of current vertex randomly with uniform distribution, and reset the weights with uniform distribution.</li><li>Compensate the source vertex&rsquo;s weight with (1 - alpha)</li><li>Repeat step 2;</li></ol></li><li>Convergence after reaching a certain number of steps or precision, then we got a recommend-list.</li></ol><h6 id=params>Params</h6><p><strong>Required</strong>:</p><ul><li>source: the id of source vertex</li><li>label: edge label go from the source vertex, should connect two different type of vertex</li></ul><p><strong>Optional</strong>:</p><ul><li>alpha: the probability of going out for one vertex in each iteration,similar to the alpha of PageRank,required, value range is (0, 1], default 0.85.</li><li>max_degree: in query process, the max iteration number of adjacency edge for a vertex, default <code>10000</code></li><li>max_depth: iteration number,range [2, 50], default <code>5</code></li><li>with_label:result filter,default <code>BOTH_LABEL</code>,optional list as follows:<ul><li>SAME_LABEL:Only keep vertex which has the same type as source vertex</li><li>OTHER_LABEL:Only keep vertex which has different type as source vertex (the another part in bipartite graph)</li><li>BOTH_LABEL:Keep both type vertex</li></ul></li><li>limit: max return vertex number,default <code>100</code></li><li>max_diff: accuracy for convergence, default <code>0.0001</code> (<em>will implement soon</em>)</li><li>sorted: whether sort the result by rank or not, true for descending sort, false for none, default <code>true</code></li></ul><h5 id=4212-usage>4.2.1.2 Usage</h5><h6 id=method--url>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/traversers/personalrank
</span></span></code></pre></div><h6 id=request-body>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:1&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;rating&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;alpha&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.6</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_depth&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>15</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;with_label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OTHER_LABEL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;sorted&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;limit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:2858&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0005014026017816927</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:1196&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0004336708357653617</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:1210&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0004128083140214213</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:593&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.00038117341069881513</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:480&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.00037005373269728036</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:1198&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.000366641614652057</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:2396&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0003622362410538888</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:2571&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0003593312457300953</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:589&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.00035922123055598566</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;2:110&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0003466135844390885</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=4213-suitable-scenario>4.2.1.3 Suitable Scenario</h5><p>In a bipartite graph build by two different type of vertex, recommend other most related vertex to one vertex. for example:</p><ul><li>Reading recommendation: find out the <strong>books</strong> should be recommended to someone first, It is also possible to recommend <strong>book pal</strong> with the highest common preferences at the same time (just like: WeChat &ldquo;your friend also read xx " function)</li><li>Social recommendation: find out other <strong>Poster</strong> who interested in same topics, or other <strong>News/Messages</strong> you may be interested with (Such as : &ldquo;Hot News&rdquo; function in Weibo)</li><li>Commodity recommendation: according to someone&rsquo;s shopping habit,find out a <strong>commodity list</strong> should recommend first, some online <strong>salesman</strong> may also be good (Such as : &ldquo;You May Like&rdquo; function in TaoBao)</li></ul><h4 id=422-neighbor-rank-api>4.2.2 Neighbor Rank API</h4><h5 id=4220-data-preparation>4.2.2.0 Data Preparation</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>Loader</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>[]</span> <span style=color:#000>args</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>HugeClient</span> <span style=color:#000>client</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>HugeClient</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;http://127.0.0.1:8080&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>SchemaManager</span> <span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>client</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>useCustomizeStringId</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>useCustomizeStringId</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;follow&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;like&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;directedBy&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>GraphManager</span> <span style=color:#000>graph</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>client</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>graph</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>O</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;O&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;O&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>A</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;A&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;A&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>B</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;B&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;B&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>C</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;C&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;C&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>D</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;D&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;D&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>E</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;E&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;E&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>F</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;F&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;F&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>G</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;G&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;G&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>H</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;H&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;H&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>I</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;I&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;I&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>J</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;movie&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;J&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;J&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>K</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;K&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;K&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>L</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;L&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;L&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>M</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;M&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;M&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>O</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;follow&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>A</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>O</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;follow&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>B</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>O</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;follow&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>C</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>D</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;follow&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>O</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>A</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;follow&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>B</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>A</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;like&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>E</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>A</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;like&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>F</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>B</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;like&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>G</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>B</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;like&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>H</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>C</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;like&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>I</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>C</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;like&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>J</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>E</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;directedBy&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>K</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>F</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;directedBy&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>B</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>F</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;directedBy&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>L</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>G</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;directedBy&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>M</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=4221-function-introduction>4.2.2.1 Function Introduction</h5><p>In a general graph structure,find the first N vertices of each layer with the highest correlation with a given starting point and their relevance.</p><p>In graph words: to go out from the starting point, get the probability of going to each vertex of each layer.</p><h6 id=params-1>Params</h6><ul><li>source: id of source vertex,required</li><li>alpha:the probability of going out for one vertex in each iteration,similar to the alpha of PageRank,required, value range is (0, 1]</li><li>steps: a path rule for source vertex visited,it&rsquo;s a list of Step,each Step map to a layout in result,required.The structure of each Step as follows:<ul><li>direction:the direction of edge(OUT, IN, BOTH), BOTH for default.</li><li>labels:a list of edge types, will union all edge types</li><li>max_degree:in query process, the max iteration number of adjacency edge for a vertex, default <code>10000</code>
(Note: before v0.12 step only support degree as parameter name, from v0.12, use max_degree, compatible with degree)</li><li>top: retains only the top N results with the highest weight in each layer of the results, default 100, max 1000</li></ul></li><li>capacity: the maximum number of vertexes visited during the traversal, optional, default 10000000</li></ul><h5 id=4222-usage>4.2.2.2 Usage</h5><h6 id=method--url-1>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/traversers/neighborrank
</span></span></code></pre></div><h6 id=request-body-1>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;source&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;O&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;steps&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;follow&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;top&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>100</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;follow&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;like&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;top&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>100</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;direction&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#4e9a06>&#34;OUT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;labels&#34;</span><span style=color:#000;font-weight:700>:[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;directedBy&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max_degree&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;top&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>100</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;alpha&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>0.9</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;capacity&#34;</span><span style=color:#000;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>-1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=response-status-1>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-1>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ranks&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;O&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;B&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4305</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;A&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;C&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.3</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;G&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.17550000000000002</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;H&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.17550000000000002</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;I&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.135</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;J&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.135</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;E&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.09000000000000001</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;F&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.09000000000000001</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;M&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.15795</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;K&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.08100000000000002</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;L&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.04050000000000001</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=4223-suitable-scenario>4.2.2.3 Suitable Scenario</h5><p>Find the vertices in different layers for a given start point that should be most recommended</p><ul><li>For example, in the four-layered structure of the audience, friends, movies, and directors, according to the movies that a certain audience&rsquo;s friends like, recommend movies for that audience, or recommend directors for those movies based on who made them.</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-32aff6fa72d51caa846c2a72e5771c5d>5.1.11 - Variable API</h1><h3 id=51-variables>5.1 Variables</h3><p>Variables can be used to store data about the entire graph. The data is accessed and stored in the form of key-value pairs.</p><h4 id=511-creating-or-updating-a-key-value-pair>5.1.1 Creating or Updating a Key-Value Pair</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/variables/name
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;tom&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;tom&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=512-listing-all-key-value-pairs>5.1.2 Listing all key-value pairs</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/variables
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;tom&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=513-listing-a-specific-key-value-pair>5.1.3 Listing a specific key-value pair</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/variables/name
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;tom&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=514-deleting-a-specific-key-value-pair>5.1.4 Deleting a specific key-value pair</h4><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/variables/name
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-3d75cf337650cd90a617c3ef7e9dca87>5.1.12 - Graphs API</h1><h3 id=61-graphs>6.1 Graphs</h3><h4 id=611-list-all-graphs>6.1.1 List all graphs</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;graphs&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph1&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=612-get-details-of-the-graph>6.1.2 Get details of the graph</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;backend&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;cassandra&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=613-clear-all-data-of-a-graph-include-schema-vertex-edge-and-index-etcthis-operation>6.1.3 Clear all data of a graph, include: schema, vertex, edge and index .etc.,**This operation</h4><p>requires administrator privileges**</p><h5 id=params>Params</h5><p>Since emptying the graph is a dangerous operation, we have added parameters for confirmation to the
API to
avoid false calls by users:</p><ul><li>confirm_message: default by <code>I'm sure to delete all data</code></li></ul><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+to+delete+all+data
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h4 id=614-clone-graphthis-operation-requires-administrator-privileges>6.1.4 Clone graph,<strong>This operation requires administrator privileges</strong></h4><h5 id=params-1>Params</h5><ul><li>clone_graph_name: name of an existed graph.
To clone from an existing graph, the user can choose to transfer the configuration file,
which will replace the configuration in the existing graph</li></ul><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph_clone?clone_graph_name=hugegraph
</span></span></code></pre></div><h5 id=request-body-optional>Request Body [Optional]</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
</span></span><span style=display:flex><span>backend=rocksdb
</span></span><span style=display:flex><span>serializer=binary
</span></span><span style=display:flex><span>store=hugegraph_clone
</span></span><span style=display:flex><span>rocksdb.data_path=./rks-data-xx
</span></span><span style=display:flex><span>rocksdb.wal_path=./rks-data-xx
</span></span></code></pre></div><blockquote><p>Note: the data/wal_path can&rsquo;t be the same as the existing graph (use separate directories)</p></blockquote><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph_clone&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;backend&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;rocksdb&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=615-create-graphthis-operation-requires-administrator-privileges>6.1.5 Create graph,<strong>This operation requires administrator privileges</strong></h4><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph2
</span></span></code></pre></div><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
</span></span><span style=display:flex><span>backend=rocksdb
</span></span><span style=display:flex><span>serializer=binary
</span></span><span style=display:flex><span>store=hugegraph2
</span></span><span style=display:flex><span>rocksdb.data_path=./rks-data-xx
</span></span><span style=display:flex><span>rocksdb.wal_path=./rks-data-xx
</span></span></code></pre></div><blockquote><p>Note: the data/wal_path can&rsquo;t be the same as the existing graph (use separate directories)</p></blockquote><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph2&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;backend&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;rocksdb&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=616-delete-graph-and-its-data>6.1.6 Delete graph and it&rsquo;s data</h4><h5 id=params-2>Params</h5><p>Since deleting a graph is a dangerous operation, we have added parameters for confirmation to the
API to
avoid false calls by users:</p><ul><li>confirm_message: default by <code>I'm sure to drop the graph</code></li></ul><h5 id=method--url-5>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph_clone?confirm_message=I%27m%20sure%20to%20drop%20the%20graph
</span></span></code></pre></div><h5 id=response-status-5>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h3 id=62-conf>6.2 Conf</h3><h4 id=621-get-configuration-for-a-graphthis-operation-requires-administrator-privileges>6.2.1 Get configuration for a graph,<strong>This operation requires administrator privileges</strong></h4><h5 id=method--url-6>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/conf
</span></span></code></pre></div><h5 id=response-status-6>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span># gremlin entrence to create graph
</span></span><span style=display:flex><span>gremlin.graph=org.apache.hugegraph.HugeFactory
</span></span><span style=display:flex><span># cache config
</span></span><span style=display:flex><span>#schema.cache_capacity=1048576
</span></span><span style=display:flex><span>#graph.cache_capacity=10485760
</span></span><span style=display:flex><span>#graph.cache_expire=600
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span># schema illegal name template
</span></span><span style=display:flex><span>#schema.illegal_name_regex=\s+|~.*
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>#vertex.default_label=vertex
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>backend=cassandra
</span></span><span style=display:flex><span>serializer=cassandra
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>store=hugegraph
</span></span><span style=display:flex><span>...=
</span></span></code></pre></div><h3 id=63-mode>6.3 Mode</h3><p>Allowed graph mode values are: NONE, RESTORING, MERGING, LOADING</p><ul><li>None mode is regular mode<ul><li>Not allowed to create schema with specified id</li><li>Not support creating vertex with id for AUTOMATIC id strategy</li></ul></li><li>LOADING mode used to load data via hugegraph-loader.<ul><li>When adding vertices / edges, it is not checked whether the required attributes are passed in</li></ul></li></ul><p>Restore has two different modes: Restoring and Merging</p><ul><li>Restoring mode is used to restore schema and graph data to a new graph.<ul><li>Support create schema with specified id</li><li>Support create vertex with id for AUTOMATIC id strategy</li></ul></li><li>Merging mode is used to merge schema and graph data to an existing graph.<ul><li>Not allowed to create schema with specified id</li><li>Support create vertex with id for AUTOMATIC id strategy</li></ul></li></ul><p>Under normal circumstances, the graph mode is None. When you need to restore the graph,
you need to temporarily modify the graph mode to Restoring or Merging as needed.
When you complete the restore, change the graph mode to None.</p><h4 id=631-get-graph-mode>6.3.1 Get graph mode.</h4><h5 id=method--url-7>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/mode
</span></span></code></pre></div><h5 id=response-status-7>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-5>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;mode&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><blockquote><p>Allowed graph mode values are: NONE, RESTORING, MERGING</p></blockquote><h4 id=632-modify-graph-mode-this-operation-requires-administrator-privileges>6.3.2 Modify graph mode. <strong>This operation requires administrator privileges</strong></h4><h5 id=method--url-8>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/mode
</span></span></code></pre></div><h5 id=request-body-1>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>&#34;RESTORING&#34;
</span></span></code></pre></div><blockquote><p>Allowed graph mode values are: NONE, RESTORING, MERGING</p></blockquote><h5 id=response-status-8>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-6>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;mode&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;RESTORING&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=633-get-graphs-read-mode>6.3.3 Get graph&rsquo;s read mode.</h4><h5 id=params-3>Params</h5><ul><li>name: name of a graph</li></ul><h5 id=method--url-9>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/graph_read_mode
</span></span></code></pre></div><h5 id=response-status-9>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-7>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;graph_read_mode&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ALL&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=634-modify-graphs-read-mode-this-operation-requires-administrator-privileges>6.3.4 Modify graph&rsquo;s read mode. <strong>This operation requires administrator privileges</strong></h4><h5 id=params-4>Params</h5><ul><li>name: name of a graph</li></ul><h5 id=method--url-10>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/graph_read_mode
</span></span></code></pre></div><h5 id=request-body-2>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>&#34;OLTP_ONLY&#34;
</span></span></code></pre></div><blockquote><p>Allowed read mode values are: ALL, OLTP_ONLY, OLAP_ONLY</p></blockquote><h5 id=response-status-10>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-8>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;graph_read_mode&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OLTP_ONLY&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=64-snapshot>6.4 Snapshot</h3><h4 id=641-create-a-snapshot>6.4.1 Create a snapshot</h4><h5 id=params-5>Params</h5><ul><li>name: name of a graph</li></ul><h5 id=method--url-11>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/snapshot_create
</span></span></code></pre></div><h5 id=response-status-11>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-9>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;snapshot_created&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=642-resume-a-snapshot>6.4.2 Resume a snapshot</h4><h5 id=params-6>Params</h5><ul><li>name: name of a graph</li></ul><h5 id=method--url-12>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/snapshot_resume
</span></span></code></pre></div><h5 id=response-status-12>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-10>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;snapshot_resumed&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=65-compact>6.5 Compact</h3><h4 id=651-manually-compact-graphthis-operation-requires-administrator-privileges>6.5.1 Manually compact graph,<strong>This operation requires administrator privileges</strong></h4><h5 id=params-7>Params</h5><ul><li>name: name of a graph</li></ul><h5 id=method--url-13>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/compact
</span></span></code></pre></div><h5 id=response-status-13>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-11>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;nodes&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;cluster_id&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;local&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;servers&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;local&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;OK&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-d9de752e44e3a8a709d187e4101fd818>5.1.13 - Task API</h1><h3 id=71-task>7.1 Task</h3><h4 id=711-list-all-async-tasks-in-graph>7.1.1 List all async tasks in graph</h4><h5 id=params>Params</h5><ul><li>status: the status of asyncTasks</li><li>limit: the max number of tasks to return</li></ul><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/tasks?status=success
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;tasks&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph.traversal().V()&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_progress&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1532943976585</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;success&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1532943976736</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_result&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;0&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_retries&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_callable&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;org.apache.hugegraph.api.job.GremlinAPI$GremlinJob&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;{\&#34;gremlin\&#34;:\&#34;hugegraph.traversal().V()\&#34;,\&#34;bindings\&#34;:{},\&#34;language\&#34;:\&#34;gremlin-groovy\&#34;,\&#34;aliases\&#34;:{\&#34;hugegraph\&#34;:\&#34;graph\&#34;}}&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=712-view-the-details-of-an-async-task>7.1.2 View the details of an async task</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/tasks/2
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph.traversal().V()&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_progress&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1532943976585</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;success&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1532943976736</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_result&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;0&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_retries&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_callable&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;org.apache.hugegraph.api.job.GremlinAPI$GremlinJob&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_input&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;{\&#34;gremlin\&#34;:\&#34;hugegraph.traversal().V()\&#34;,\&#34;bindings\&#34;:{},\&#34;language\&#34;:\&#34;gremlin-groovy\&#34;,\&#34;aliases\&#34;:{\&#34;hugegraph\&#34;:\&#34;graph\&#34;}}&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=713-delete-task-information-of-an-async-taskwont-delete-the-task-itself>7.1.3 Delete task information of an async task,<strong>won&rsquo;t delete the task itself</strong></h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/tasks/2
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h4 id=714-cancel-an-async-task-the-task-should-be-able-to-be-canceled>7.1.4 Cancel an async task, <strong>the task should be able to be canceled</strong></h4><p>If you already created an async task via <a href=../gremlin>Gremlin API</a> as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#4e9a06>&#34;for (int i = 0; i &lt; 10; i++) {&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph.addVertex(T.label, &#39;man&#39;);&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;hugegraph.tx().commit();&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;try {&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;sleep(1000);&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;} catch (InterruptedException e) {&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;break;&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;}&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span><span style=color:#4e9a06>&#34;}&#34;</span>
</span></span></code></pre></div><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/tasks/2?action=cancel
</span></span></code></pre></div><blockquote><p>cancel it in 10s. if more than 10s, the task may already be finished, then can&rsquo;t be cancelled.</p></blockquote><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>202</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cancelled&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>true</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>At this point, the number of vertices whose label is man must be less than 10.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-e84b0f106294b580ca64918b72cc71d1>5.1.14 - Gremlin API</h1><h3 id=81-gremlin>8.1 Gremlin</h3><h4 id=811-sending-a-gremlin-statement-get-to-hugegraphserver-for-synchronous-execution>8.1.1 Sending a gremlin statement (GET) to HugeGraphServer for synchronous execution</h4><h5 id=params>Params</h5><ul><li>gremlin: The gremlin statement to be sent to <code>HugeGraphServer</code> for execution</li><li>bindings: Used to bind parameters. Key is a string, and the value is the bound value (can only be a string or number). This functionality is similar to MySQL&rsquo;s Prepared Statement and is used to speed up statement execution.</li><li>language: The language type of the sent statement. Default is <code>gremlin-groovy</code>.</li><li>aliases: Adds aliases for existing variables in the graph space.</li></ul><p><strong>Querying vertices</strong></p><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://127.0.0.1:8080/gremlin?gremlin=hugegraph.traversal().V(&#39;1:marko&#39;)
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;requestId&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;c6ef47a8-b634-4b07-9d38-6b3b69a3a556&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;message&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;code&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>200</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;attributes&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;result&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;meta&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=812-sending-a-gremlin-statement-post-to-hugegraphserver-for-synchronous-execution>8.1.2 Sending a gremlin statement (POST) to HugeGraphServer for synchronous execution</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/gremlin
</span></span></code></pre></div><p><strong>Querying vertices</strong></p><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph.traversal().V(&#39;1:marko&#39;)&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;bindings&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;language&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin-groovy&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aliases&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;requestId&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;c6ef47a8-b634-4b07-9d38-6b3b69a3a556&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;message&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;code&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>200</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;attributes&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;result&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;vertex&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;city&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&gt;city&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&gt;name&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;marko&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;age&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&gt;age&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>29</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;meta&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>Here we directly use the graph object (<code>hugegraph</code>), first retrieve its traversal iterator (<code>traversal()</code>), and then retrieve the vertices. Instead of writing <code>graph.traversal().V()</code> or <code>g.V()</code>, you can use aliases to operate on the graph and traversal iterator. In this case, <code>hugegraph</code> is a native variable, and <code>__g_hugegraph</code> is an additional variable added by HugeGraphServer. Each graph will have a corresponding traversal iterator object in this format (<code>__g_${graph}</code>).</p></blockquote><blockquote><p>The structure of the response body is different from the RESTful API structure of other vertices or edges. Users may need to parse it manually.</p></blockquote><p><strong>Querying edges</strong></p><h5 id=request-body-1>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;g.E(&#39;S1:marko&gt;2&gt;&gt;S2:lop&#39;)&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;bindings&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;language&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin-groovy&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aliases&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;g&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;__g_hugegraph&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;requestId&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3f117cd4-eedc-4e08-a106-ee01d7bb8249&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;status&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;message&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;code&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>200</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;attributes&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;result&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;data&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;edge&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outVLabel&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;inV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2:lop&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;outV&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;1:marko&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.4</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;date&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;20171210&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;meta&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=813-sending-a-gremlin-statement-post-to-hugegraphserver-for-asynchronous-execution>8.1.3 Sending a gremlin statement (POST) to HugeGraphServer for asynchronous execution</h4><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/jobs/gremlin
</span></span></code></pre></div><p><strong>Querying vertices</strong></p><h5 id=request-body-2>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;g.V(&#39;1:marko&#39;)&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;bindings&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;language&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin-groovy&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aliases&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>Asynchronous execution of Gremlin statements does not currently support aliases. You can use <code>graph</code> to represent the graph you want to operate on, or directly use the name of the graph, such as <code>hugegraph</code>. Additionally, <code>g</code> represents the traversal, which is equivalent to <code>graph.traversal()</code> or <code>hugegraph.traversal()</code>.</p></blockquote><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can query the execution status of an asynchronous task by using <code>GET http://localhost:8080/graphs/hugegraph/tasks/1</code> (where &ldquo;1&rdquo; is the task_id). For more information, refer to the <a href=../task>Asynchronous Task RESTful API</a>.</p></blockquote><p><strong>Querying edges</strong></p><h5 id=request-body-3>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;g.E(&#39;S1:marko&gt;2&gt;&gt;S2:lop&#39;)&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;bindings&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;language&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin-groovy&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;aliases&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;task_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><p>Note:</p><blockquote><p>You can query the execution status of an asynchronous task by using <code>GET http://localhost:8080/graphs/hugegraph/tasks/2</code> (where &ldquo;2&rdquo; is the task_id). For more information, refer to the <a href=../task>Asynchronous Task RESTful API</a>.</p></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-f7fe8b1685038d0062b4c806247e1db4>5.1.15 - Cypher API</h1><h3 id=91-cypher>9.1 Cypher</h3><h4 id=911-sending-a-cypher-statement-get-to-hugegraphserver-for-synchronous-execution>9.1.1 Sending a cypher statement (GET) to HugeGraphServer for synchronous execution</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000>GET</span> <span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000>graphs</span><span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000;font-weight:700>{</span><span style=color:#000>graph</span><span style=color:#000;font-weight:700>}</span><span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000>cypher</span><span style=color:#ce5c00;font-weight:700>?</span><span style=color:#000>cypher</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#000;font-weight:700>{</span><span style=color:#000>cypher</span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=params>Params</h5><ul><li>graph: Graph name</li><li>cypher: Cypher statement</li></ul><h5 id=example>Example</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000>GET</span> <span style=color:#000>http</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#8f5902;font-style:italic>//localhost:8080/graphs/hugecypher1/cypher?cypher=match(n:person) return n.name as name order by n.name limit 1
</span></span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;requestId&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;766b9f48-2f10-40d9-951a-3027d0748ab7&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;status&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;message&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;code&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>200</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;attributes&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;result&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;data&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hello&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;meta&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=912-sending-a-cypher-statement-post-to-hugegraphserver-for-synchronous-execution>9.1.2 Sending a cypher statement (POST) to HugeGraphServer for synchronous execution</h4><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000>POST</span> <span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000>graphs</span><span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000;font-weight:700>{</span><span style=color:#000>graph</span><span style=color:#000;font-weight:700>}</span><span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000>cypher</span>
</span></span></code></pre></div><h5 id=params-1>Params</h5><ul><li>graph: Graph name</li></ul><h5 id=body>Body</h5><p>{cypher}</p><ul><li>cypher: Cypher statement</li></ul><p>Note:</p><blockquote><p>It is not in JSON format, but a plain text Cypher statement.</p></blockquote><h5 id=example-1>Example</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000>POST</span> <span style=color:#000>http</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#8f5902;font-style:italic>//localhost:8080/graphs/hugecypher1/cypher
</span></span></span></code></pre></div><h6 id=request-body>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>match(n:person) return n.name as name order by n.name limit 1
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;requestId&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;f096bee0-e249-498f-b5a3-ea684fc84f57&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;status&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;message&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;code&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>200</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;attributes&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;result&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;data&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hello&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;meta&#34;</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-a3b125f257052209fcb98300d5c066a7>5.1.16 - Authentication API</h1><h3 id=101-user-authentication-and-access-control>10.1 User Authentication and Access Control</h3><blockquote><p>To enable authentication and related configurations, please refer to the <a href=/docs/config/config-authentication/>Authentication Configuration</a> documentation.</p></blockquote><h5 id=overview-of-user-authentication-and-access-control>Overview of User Authentication and Access Control:</h5><p>HugeGraph supports multi-user authentication and fine-grained access control. It adopts a 4-tier design based on &ldquo;User-User Group-Operation-Resource&rdquo; to flexibly control user roles and permissions. Resources describe data in the graph database, such as vertices that meet certain conditions. Each resource consists of three elements: type, label, and properties. There are a total of 18 types and combinations of any label and properties to form resources. The internal condition of a resource is an &ldquo;AND&rdquo; relationship, while the condition between multiple resources is an &ldquo;OR&rdquo; relationship. Users can belong to one or more user groups, and each user group can have permissions for any number of resources. The types of operations include read, write, delete, execute, etc. HugeGraph supports dynamically creating users, user groups, and resources, and supports dynamically assigning or revoking permissions. During the initialization of the database, a super administrator user is created, and subsequently, various role users can be created by the super administrator. If a newly created user is assigned sufficient permissions, they can create or manage more users.</p><h5 id=example>Example:</h5><p>user(name=boss) -belong-> group(name=all) -access(read)-> target(graph=graph1, resource={label: person, city: Beijing})<br>Description: User &lsquo;boss&rsquo; has read permission for people in the &lsquo;graph1&rsquo; graph from Beijing.</p><h5 id=interface-description>Interface Description:</h5><p>The user authentication and access control interface includes 5 categories: UserAPI, GroupAPI, TargetAPI, BelongAPI, AccessAPI.</p><h3 id=102-user-user-api>10.2 User (User) API</h3><p>The user interface includes APIs for creating users, deleting users, modifying users, and querying user-related information.</p><h4 id=1021-create-user>10.2.1 Create User</h4><h5 id=params>Params</h5><ul><li>user_name: User name</li><li>user_password: User password</li><li>user_phone: User phone number</li><li>user_email: User email</li></ul><p>Both user_name and user_password are required.</p><h5 id=request-body>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_password&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;******&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_phone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;182****9088&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_email&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;123@xx.com&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/auth/users
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><p>In the response message, the password is encrypted as ciphertext.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_password&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;******&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_email&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;123@xx.com&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-17 14:31:07.833&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_phone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;182****9088&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-17 14:31:07.833&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1022-delete-user>10.2.2 Delete User</h4><h5 id=params-1>Params</h5><ul><li>id: User ID to be deleted</li></ul><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/auth/users/-63:test
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>1</span>
</span></span></code></pre></div><h4 id=1023-modify-user>10.2.3 Modify User</h4><h5 id=params-2>Params</h5><ul><li>id: User ID to be modified</li></ul><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/auth/users/-63:test
</span></span></code></pre></div><h5 id=request-body-1>Request Body</h5><p>Modify user_name, user_password, and user_phone.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;test&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_password&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;******&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_phone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;183****9266&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><p>The returned result is the entire user object including the modified content.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_password&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;******&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 10:29:30.455&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;test&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_phone&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;183****9266&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:test&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 10:27:13.601&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1024-query-user-list>10.2.4 Query User List</h4><h5 id=params-3>Params</h5><ul><li>limit: Upper limit of the number of results returned</li></ul><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/users
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;users&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_password&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;******&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 11:41:12.254&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;system&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 11:41:12.254&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1025-query-a-user>10.2.5 Query a User</h4><h5 id=params-4>Params</h5><ul><li>id: User ID to be queried</li></ul><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/users/-63:admin
</span></span></code></pre></div><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;users&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_password&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;******&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 11:41:12.254&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;system&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 11:41:12.254&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1026-query-roles-of-a-user>10.2.6 Query Roles of a User</h4><h5 id=method--url-5>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/users/-63:boss/role
</span></span></code></pre></div><h5 id=response-status-5>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-5>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;roles&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;READ&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ALL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;*&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=103-group-group-api>10.3 Group (Group) API</h3><p>Groups grant corresponding resource permissions, and users are assigned to different groups, thereby having different resource permissions.
The group interface includes APIs for creating groups, deleting groups, modifying groups, and querying group-related information.</p><h4 id=1031-create-group>10.3.1 Create Group</h4><h5 id=params-5>Params</h5><ul><li>group_name: Group name</li><li>group_description: Group description</li></ul><h5 id=request-body-2>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;group can do anything&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=method--url-6>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/auth/groups
</span></span></code></pre></div><h5 id=response-status-6>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-6>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:46:08.791&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:46:08.791&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;group can do anything&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1032-delete-group>10.3.2 Delete Group</h4><h5 id=params-6>Params</h5><ul><li>id: Group ID to be deleted</li></ul><h5 id=method--url-7>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/auth/groups/-69:grant
</span></span></code></pre></div><h5 id=response-status-7>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h5 id=response-body-7>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>1</span>
</span></span></code></pre></div><h4 id=1033-modify-group>10.3.3 Modify Group</h4><h5 id=params-7>Params</h5><ul><li>id: Group ID to be modified</li></ul><h5 id=method--url-8>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/auth/groups/-69:grant
</span></span></code></pre></div><h5 id=request-body-3>Request Body</h5><p>Modify group_description</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;grant&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-8>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-8>Response Body</h5><p>The returned result is the entire group object including the modified content.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 09:50:58.458&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 09:57:58.155&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;grant&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1034-query-group-list>10.3.4 Query Group List</h4><h5 id=params-8>Params</h5><ul><li>limit: Upper limit of the number of results returned</li></ul><h5 id=method--url-9>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/groups
</span></span></code></pre></div><h5 id=response-status-9>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-9>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;groups&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:46:08.791&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:46:08.791&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;group can do anything&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1035-query-a-specific-group>10.3.5 Query a Specific Group</h4><h5 id=params-9>Params</h5><ul><li>id: Group ID to be queried</li></ul><h5 id=method--url-10>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/groups/-69:all
</span></span></code></pre></div><h5 id=response-status-10>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-10>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:46:08.791&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:46:08.791&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;group can do anything&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=104-resource-target-api>10.4 Resource (Target) API</h3><p>Resources describe data in the graph database, such as vertices that meet certain criteria. Each resource includes three elements: type, label, and properties. There are 18 types in total, and the combination of any label and any properties forms a resource. The internal conditions of a resource are based on the AND relationship, while the conditions between multiple resources are based on the OR relationship.<br>The resource API includes creating, deleting, modifying, and querying resources.</p><h4 id=1041-create-resource>10.4.1 Create Resource</h4><h5 id=params-10>Params</h5><ul><li>target_name: Name of the resource</li><li>target_graph: Graph of the resource</li><li>target_url: URL of the resource</li><li>target_resources: Resource definitions (list)</li></ul><p>target_resources can include multiple target_resource, stored in the form of a list.<br>Each target_resource contains:</p><ul><li>type: Optional value: VERTEX, EDGE, etc. Can be filled with ALL, indicating it can be a vertex or edge.</li><li>label: Optional value: name of a vertex or edge type. Can be filled with *, indicating any type.</li><li>properties: Map type, can contain multiple key-value pairs of properties. Must match all property values. Property values can support conditional ranges (e.g., age: P.gte(18)). If properties are null, it means any property is allowed. If both the property name and value are &lsquo;*&rsquo;, it also means any property is allowed.</li></ul><p>For example, a specific resource: &ldquo;target_resources&rdquo;: [{&ldquo;type&rdquo;:&ldquo;VERTEX&rdquo;,&ldquo;label&rdquo;:&ldquo;person&rdquo;,&ldquo;properties&rdquo;:{&ldquo;city&rdquo;:&ldquo;Beijing&rdquo;,&ldquo;age&rdquo;:&ldquo;P.gte(20)&rdquo;}}]<br>The resource definition means: a vertex of type &lsquo;person&rsquo; with the city property set to &lsquo;Beijing&rsquo; and the age property greater than or equal to 20.</p><h5 id=request-body-4>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_url&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;127.0.0.1:8080&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_resources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ALL&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=method--url-11>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/auth/targets
</span></span></code></pre></div><h5 id=response-status-11>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-11>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_url&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;127.0.0.1:8080&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:32:01.192&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_resources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ALL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;*&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:32:01.192&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1042-delete-resource>10.4.2 Delete Resource</h4><h5 id=params-11>Params</h5><ul><li>id: Resource Id to be deleted</li></ul><h5 id=method--url-12>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/auth/targets/-77:gremlin
</span></span></code></pre></div><h5 id=response-status-12>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h5 id=response-body-12>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>1</span>
</span></span></code></pre></div><h4 id=1043-modify-resource>10.4.3 Modify Resource</h4><h5 id=params-12>Params</h5><ul><li>id: Resource Id to be modified</li></ul><h5 id=method--url-13>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/auth/targets/-77:gremlin
</span></span></code></pre></div><h5 id=request-body-5>Request Body</h5><p>Modify the &rsquo;type&rsquo; in the resource definition.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_url&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;127.0.0.1:8080&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_resources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-13>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-13>Response Body</h5><p>The response contains the entire target group object, including the modified content.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_url&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;127.0.0.1:8080&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 09:34:13.848&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_resources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;*&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:gremlin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 09:37:12.780&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1044-query-resource-list>10.4.4 Query Resource List</h4><h5 id=params-13>Params</h5><ul><li>limit: Upper limit of the number of returned results.</li></ul><h5 id=method--url-14>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/targets
</span></span></code></pre></div><h5 id=response-status-14>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-14>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;targets&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_url&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;127.0.0.1:8080&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:32:01.192&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_resources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ALL&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;*&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:32:01.192&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_url&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;127.0.0.1:8080&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:43:24.841&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_resources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GRANT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;*&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:43:24.841&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1045-query-a-specific-resource>10.4.5 Query a Specific Resource</h4><h5 id=params-14>Params</h5><ul><li>id: Id of the resource to query</li></ul><h5 id=method--url-15>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/targets/-77:grant
</span></span></code></pre></div><h5 id=response-status-15>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-15>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_name&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_url&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;127.0.0.1:8080&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_graph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:43:24.841&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_resources&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;type&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GRANT&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;label&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;*&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;properties&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#204a87;font-weight:700>null</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>],</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:43:24.841&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=105-association-of-roles-belong-api>10.5 Association of Roles (Belong) API</h3><p>The association between users and user groups allows a user to be associated with one or more user groups. User groups have permissions for related resources, and the permissions for different user groups can be understood as different roles. In other words, users are associated with roles.<br>The API for associating roles includes creating, deleting, modifying, and querying the association of roles for users.</p><h4 id=1051-create-an-association-of-roles-for-a-user>10.5.1 Create an Association of Roles for a User</h4><h5 id=params-15>Params</h5><ul><li>user: User ID</li><li>group: User group ID</li><li>belong_description: Description</li></ul><h5 id=request-body-6>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=method--url-16>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/auth/belongs
</span></span></code></pre></div><h5 id=response-status-16>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-16>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 16:19:35.422&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 16:19:35.422&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-63:boss&gt;-82&gt;&gt;S-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1052-delete-an-association-of-roles>10.5.2 Delete an Association of Roles</h4><h5 id=params-16>Params</h5><ul><li>id: ID of the association of roles to delete</li></ul><h5 id=method--url-17>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/auth/belongs/S-63:boss&gt;-82&gt;&gt;S-69:grant
</span></span></code></pre></div><h5 id=response-status-17>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h5 id=response-body-17>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>1</span>
</span></span></code></pre></div><h4 id=1053-modify-an-association-of-roles>10.5.3 Modify an Association of Roles</h4><p>An association of roles can only be modified for its description. The <code>user</code> and <code>group</code> properties cannot be modified. If you need to modify an association of roles, you need to delete the existing association and create a new one.</p><h5 id=params-17>Params</h5><ul><li>id: ID of the association of roles to modify</li></ul><h5 id=method--url-18>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/auth/belongs/S-63:boss&gt;-82&gt;&gt;S-69:grant
</span></span></code></pre></div><h5 id=request-body-7>Request Body</h5><p>Modify the <code>belong_description</code> field</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;update test&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-18>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-18>Response Body</h5><p>The response includes the modified content as well as the entire association of roles object</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;update test&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 10:40:21.720&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 10:42:47.265&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-63:boss&gt;-82&gt;&gt;S-69:grant&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:grant&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1054-query-list-of-associations-of-roles>10.5.4 Query List of Associations of Roles</h4><h5 id=params-18>Params</h5><ul><li>limit: Upper limit on the number of results to return</li></ul><h5 id=method--url-19>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/belongs
</span></span></code></pre></div><h5 id=response-status-19>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-19>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belongs&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 16:19:35.422&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 16:19:35.422&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-63:boss&gt;-82&gt;&gt;S-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1055-view-a-specific-association-of-roles>10.5.5 View a Specific Association of Roles</h4><h5 id=params-19>Params</h5><ul><li>id: The id of the association of roles to be queried</li></ul><h5 id=method--url-20>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/belongs/S-63:boss&gt;-82&gt;&gt;S-69:all
</span></span></code></pre></div><h5 id=response-status-20>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-20>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 16:19:35.422&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;belong_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 16:19:35.422&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-63:boss&gt;-82&gt;&gt;S-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;user&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-63:boss&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=106-authorization-access-api>10.6 Authorization (Access) API</h3><p>Grant permissions to user groups for resources, including operations such as READ, WRITE, DELETE, EXECUTE, etc.
The authorization API includes: creating, deleting, modifying, and querying permissions.</p><h4 id=1061-create-authorization-granting-permissions-to-user-groups-for-resources>10.6.1 Create Authorization (Granting permissions to user groups for resources)</h4><h5 id=params-20>Params</h5><ul><li>group: Group ID</li><li>target: Resource ID</li><li>access_permission: Permission grant</li><li>access_description: Authorization description</li></ul><p>Access permissions:</p><ul><li>READ: Read operations, including all queries such as querying the schema, retrieving vertices/edges, aggregating vertex and edge counts (VERTEX_AGGR/EDGE_AGGR), and reading the graph&rsquo;s status (STATUS), variables (VAR), tasks (TASK), etc.</li><li>WRITE: Write operations, including creating and updating operations, such as adding property keys to the schema or adding/updating properties of vertices.</li><li>DELETE: Delete operations, including deleting metadata, vertices, or edges.</li><li>EXECUTE: Execute operations, including executing Gremlin queries, executing tasks, and executing metadata functions.</li></ul><h5 id=request-body-8>Request Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_permission&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;READ&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=method--url-21>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>POST http://localhost:8080/graphs/hugegraph/auth/accesses
</span></span></code></pre></div><h5 id=response-status-21>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>201</span>
</span></span></code></pre></div><h5 id=response-body-21>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_permission&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;READ&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:54:54.008&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-69:all&gt;-88&gt;11&gt;S-77:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:54:54.008&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:all&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1062-delete-authorization>10.6.2 Delete Authorization</h4><h5 id=params-21>Params</h5><ul><li>id: The ID of the authorization to be deleted</li></ul><h5 id=method--url-22>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>DELETE http://localhost:8080/graphs/hugegraph/auth/accesses/S-69:all&gt;-88&gt;12&gt;S-77:all
</span></span></code></pre></div><h5 id=response-status-22>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>204</span>
</span></span></code></pre></div><h5 id=response-body-22>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>1</span>
</span></span></code></pre></div><h4 id=1063-modify-authorization>10.6.3 Modify Authorization</h4><p>Authorization can only be modified for its description. User group, resource, and permission cannot be modified. If you need to modify the relationship of the authorization, you can delete the original authorization relationship and create a new one.</p><h5 id=params-22>Params</h5><ul><li>id: The ID of the authorization to be modified</li></ul><h5 id=method--url-23>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/hugegraph/auth/accesses/S-69:all&gt;-88&gt;12&gt;S-77:all
</span></span></code></pre></div><h5 id=request-body-9>Request Body</h5><p>Modify access_description</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;test&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=response-status-23>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-23>Response Body</h5><h4 id=return-result-including-modified-content-of-the-entire-user-group-object>Return Result Including Modified Content of the Entire User Group Object</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_description&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;test&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_permission&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;WRITE&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 10:12:03.074&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-69:all&gt;-88&gt;12&gt;S-77:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-12 10:16:18.637&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:all&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1064-query-authorization-list>10.6.4 Query Authorization List</h4><h5 id=params-23>Params</h5><ul><li>limit: The maximum number of results to return</li></ul><h5 id=method--url-24>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/accesses
</span></span></code></pre></div><h5 id=response-status-24>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-24>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;accesses&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>[</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_permission&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;READ&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:54:54.008&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-69:all&gt;-88&gt;11&gt;S-77:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:54:54.008&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:all&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=1065-query-a-specific-authorization>10.6.5 Query a Specific Authorization</h4><h5 id=params-24>Params</h5><ul><li>id: The ID of the authorization to be queried</li></ul><h5 id=method--url-25>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/hugegraph/auth/accesses/S-69:all&gt;-88&gt;11&gt;S-77:all
</span></span></code></pre></div><h5 id=response-status-25>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-25>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_permission&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;READ&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:54:54.008&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;S-69:all&gt;-88&gt;11&gt;S-77:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_update&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;2020-11-11 15:54:54.008&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;access_creator&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;admin&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;group&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-69:all&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;target&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;-77:all&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-db6682f721f1c345d19274e452d1d3d3>5.1.17 - Metrics API</h1><p>HugeGraph provides a metrics interface for obtaining monitoring information, such as statistics on
each Gremlin execution time, cache size, etc. The metrics interface includes the following
categories: basic metrics, statistical metrics, system metrics, and backend storage metrics.</p><h2 id=1-basic-metrics>1. Basic Metrics</h2><h3 id=11-get-all-basic-metrics>1.1 Get All Basic Metrics</h3><h5 id=params>Params</h5><ul><li>type: If the passed value is <code>json</code>, it is returned in json format, otherwise it is returned in
Promethaus format.</li></ul><h5 id=111-method--url>1.1.1 Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>http://localhost:8080/metrics/?type=json
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;gauges&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1000000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.instances&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>17</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>17</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10240</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10240</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10240</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.server.RestServer.max-write-threads&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.task.TaskManager.pending-tasks&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.task.TaskManager.workers&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>4</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.average-load-penalty&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>922769200</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.estimated-size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.eviction-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.eviction-weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.hit-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.hit-rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-failure-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-failure-rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-success-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.long-run-compilation-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.miss-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.miss-rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.request-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.total-load-time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1845538400</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.sessions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;counters&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;favicon.ico/GET/FAILED_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;favicon.ico/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/POST/FAILED_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/POST/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/backend/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/backend/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/gauges/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/gauges/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/system/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/system/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;system/GET/FAILED_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;system/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;histograms&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;favicon.ico/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/POST/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/backend/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>12.6852124529148</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6.992918475157571</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/gauges/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/system/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>8.942674506664073</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>16.665399873223066</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;system/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;meters&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.commit-succeed&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.expected-error&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.illegal-arg&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.unknown-error&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.errors&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;timers&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.auth.AccessAPI.create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;duration_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;milliseconds&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;calls/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.auth.AccessAPI.delete&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;duration_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;milliseconds&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;calls/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.auth.AccessAPI.get&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;duration_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;milliseconds&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;calls/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.auth.AccessAPI.list&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;duration_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;milliseconds&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;calls/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#a40000>...</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=112-method--url>1.1.2 Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>http://localhost:8080/metrics/
</span></span></code></pre></div><h5 id=response-status-1>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-1>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span># HELP hugegraph_info
</span></span><span style=display:flex><span># TYPE hugegraph_info untyped
</span></span><span style=display:flex><span>hugegraph_info{version=&#34;0.69&#34;,
</span></span><span style=display:flex><span>} 1.0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_capacity
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_capacity gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_capacity 1000000
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_expire
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_expire gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_expire 600000
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_hits
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_hits gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_hits 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_miss
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_miss gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_miss 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_size
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_size gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_edge_hugegraph_size 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_instances
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_instances gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_instances 7
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_capacity
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_capacity gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_capacity 10000
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_expire
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_expire gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_expire 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_hits
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_hits gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_hits 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_miss
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_miss gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_miss 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_size
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_size gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_id_hugegraph_size 17
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_capacity
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_capacity gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_capacity 10000
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_expire
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_expire gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_expire 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_hits
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_hits gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_hits 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_miss
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_miss gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_miss 0
</span></span><span style=display:flex><span># HELP org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_size
</span></span><span style=display:flex><span># TYPE org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_size gauge
</span></span><span style=display:flex><span>org_apache_hugegraph_backend_cache_Cache_schema_name_hugegraph_size 17
</span></span><span style=display:flex><span>...
</span></span></code></pre></div><h3 id=12-get-gauges-metrics>1.2 Get Gauges Metrics</h3><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>http://localhost:8080/metrics/gauges
</span></span></code></pre></div><h5 id=response-status-2>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-2>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1000000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.edge-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.instances&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-id-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>17</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.schema-name-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>17</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10240</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.token-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10240</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10240</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.users_pwd-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10000000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.expire&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>600000</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.hits&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.miss&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.backend.cache.Cache.vertex-hugegraph.size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.server.RestServer.max-write-threads&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.task.TaskManager.pending-tasks&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.task.TaskManager.workers&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>4</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.average-load-penalty&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>9.227692E8</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.estimated-size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.eviction-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.eviction-weight&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.hit-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.hit-rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-failure-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-failure-rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.load-success-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.long-run-compilation-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.miss-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.miss-rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.request-count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.gremlin-groovy.sessionless.class-cache.total-load-time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1845538400</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.sessions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;value&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=13-get-counters-metrics>1.3 Get Counters Metrics</h3><h5 id=method--url-1>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/counters
</span></span></code></pre></div><h5 id=response-status-3>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-3>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;favicon.ico/GET/FAILED_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;favicon.ico/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics//GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics//GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/POST/FAILED_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/POST/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/backend/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/backend/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/gauges/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/gauges/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/statistics/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/statistics/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/system/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/system/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/timers/GET/SUCCESS_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/timers/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;system/GET/FAILED_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;system/GET/TOTAL_COUNTER&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=14-get-histograms-metrics>1.4 Get Histograms Metrics</h3><h5 id=method--url-2>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/gauges
</span></span></code></pre></div><h5 id=response-status-4>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-4>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;favicon.ico/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics//GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/POST/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/backend/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>12.6852124529148</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6.992918475157571</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>6.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/gauges/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/statistics/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.4551211076264199</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.49798181193626</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/system/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>8.942674506664073</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>16.665399873223066</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/timers/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;system/GET/RESPONSE_TIME_HISTOGRAM&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=15-get-meters-metrics>1.5 Get Meters Metrics</h3><h5 id=method--url-3>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/meters
</span></span></code></pre></div><h5 id=response-status-5>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-5>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.commit-succeed&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.expected-error&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.illegal-arg&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.API.unknown-error&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.tinkerpop.gremlin.server.GremlinServer.errors&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;events/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h3 id=16-get-timers-metrics>1.6 Get Timers Metrics</h3><h5 id=method--url-4>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/timers
</span></span></code></pre></div><h5 id=response-status-6>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-6>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.auth.AccessAPI.create&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;duration_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;milliseconds&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;calls/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;org.apache.hugegraph.api.auth.AccessAPI.delete&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;min&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;stddev&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p50&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p75&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p95&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p98&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p99&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;p999&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;duration_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;milliseconds&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mean_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m15_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m5_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;m1_rate&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;rate_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;calls/second&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#a40000>...</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h2 id=2statistical-metrics>2.Statistical Metrics</h2><h5 id=params-1>Params</h5><ul><li>type: If the passed value is JSON, it is returned in JSON format, otherwise it is returned in
Promethaus format.</li></ul><h5 id=21-method--url>2.1 Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/statistics
</span></span></code></pre></div><h5 id=response-status-7>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span># HELP hugegraph_info
</span></span><span style=display:flex><span># TYPE hugegraph_info untyped
</span></span><span style=display:flex><span>hugegraph_info{version=&#34;0.69&#34;,
</span></span><span style=display:flex><span>} 1.0
</span></span><span style=display:flex><span># HELP metrics_POST
</span></span><span style=display:flex><span># TYPE metrics_POST gauge
</span></span><span style=display:flex><span>metrics_POST{name=FAILED_REQUEST,} 1
</span></span><span style=display:flex><span>metrics_POST{name=MEAN_RESPONSE_TIME,} 21.0
</span></span><span style=display:flex><span>metrics_POST{
</span></span><span style=display:flex><span>name=MAX_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 21
</span></span><span style=display:flex><span>metrics_POST{name=SUCCESS_REQUEST,
</span></span><span style=display:flex><span>} 0
</span></span><span style=display:flex><span>metrics_POST{
</span></span><span style=display:flex><span>name=TOTAL_REQUEST,
</span></span><span style=display:flex><span>} 1
</span></span><span style=display:flex><span># HELP metrics_backend_GET
</span></span><span style=display:flex><span># TYPE metrics_backend_GET gauge
</span></span><span style=display:flex><span>metrics_backend_GET{name=FAILED_REQUEST,
</span></span><span style=display:flex><span>} 0
</span></span><span style=display:flex><span>metrics_backend_GET{
</span></span><span style=display:flex><span>name=MEAN_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 12.6852124529148
</span></span><span style=display:flex><span>metrics_backend_GET{
</span></span><span style=display:flex><span>name=MAX_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 20
</span></span><span style=display:flex><span>metrics_backend_GET{
</span></span><span style=display:flex><span>name=SUCCESS_REQUEST,
</span></span><span style=display:flex><span>} 2
</span></span><span style=display:flex><span>metrics_backend_GET{name=TOTAL_REQUEST,} 2
</span></span><span style=display:flex><span># HELP system_GET
</span></span><span style=display:flex><span># TYPE system_GET gauge
</span></span><span style=display:flex><span>system_GET{name=FAILED_REQUEST,} 1
</span></span><span style=display:flex><span>system_GET{name=MEAN_RESPONSE_TIME,} 2.0
</span></span><span style=display:flex><span>system_GET{name=MAX_RESPONSE_TIME,} 2
</span></span><span style=display:flex><span>system_GET{
</span></span><span style=display:flex><span>name=SUCCESS_REQUEST,
</span></span><span style=display:flex><span>} 0
</span></span><span style=display:flex><span>system_GET{name=TOTAL_REQUEST,
</span></span><span style=display:flex><span>} 1
</span></span><span style=display:flex><span># HELP metrics_gauges_GET
</span></span><span style=display:flex><span># TYPE metrics_gauges_GET gauge
</span></span><span style=display:flex><span>metrics_gauges_GET{name=FAILED_REQUEST,} 0
</span></span><span style=display:flex><span>metrics_gauges_GET{name=MEAN_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 7.0
</span></span><span style=display:flex><span>metrics_gauges_GET{
</span></span><span style=display:flex><span>name=MAX_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 7
</span></span><span style=display:flex><span>metrics_gauges_GET{
</span></span><span style=display:flex><span>name=SUCCESS_REQUEST,
</span></span><span style=display:flex><span>} 1
</span></span><span style=display:flex><span>metrics_gauges_GET{
</span></span><span style=display:flex><span>name=TOTAL_REQUEST,
</span></span><span style=display:flex><span>} 1
</span></span><span style=display:flex><span># HELP favicon.ico_GET
</span></span><span style=display:flex><span># TYPE favicon.ico_GET gauge
</span></span><span style=display:flex><span>favicon.ico_GET{name=FAILED_REQUEST,
</span></span><span style=display:flex><span>} 1
</span></span><span style=display:flex><span>favicon.ico_GET{
</span></span><span style=display:flex><span>name=MEAN_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 1.0
</span></span><span style=display:flex><span>favicon.ico_GET{name=MAX_RESPONSE_TIME,} 1
</span></span><span style=display:flex><span>favicon.ico_GET{name=SUCCESS_REQUEST,} 0
</span></span><span style=display:flex><span>favicon.ico_GET{
</span></span><span style=display:flex><span>name=TOTAL_REQUEST,
</span></span><span style=display:flex><span>} 1
</span></span><span style=display:flex><span># HELP metrics__GET
</span></span><span style=display:flex><span># TYPE metrics__GET gauge
</span></span><span style=display:flex><span>metrics__GET{name=FAILED_REQUEST,} 0
</span></span><span style=display:flex><span>metrics__GET{name=MEAN_RESPONSE_TIME,} 10.0
</span></span><span style=display:flex><span>metrics__GET{name=MAX_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 10
</span></span><span style=display:flex><span>metrics__GET{
</span></span><span style=display:flex><span>name=SUCCESS_REQUEST,
</span></span><span style=display:flex><span>} 2
</span></span><span style=display:flex><span>metrics__GET{
</span></span><span style=display:flex><span>name=TOTAL_REQUEST,
</span></span><span style=display:flex><span>} 2
</span></span><span style=display:flex><span># HELP metrics_system_GET
</span></span><span style=display:flex><span># TYPE metrics_system_GET gauge
</span></span><span style=display:flex><span>metrics_system_GET{name=FAILED_REQUEST,} 0
</span></span><span style=display:flex><span>metrics_system_GET{name=MEAN_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 8.942674506664073
</span></span><span style=display:flex><span>metrics_system_GET{
</span></span><span style=display:flex><span>name=MAX_RESPONSE_TIME,
</span></span><span style=display:flex><span>} 40
</span></span><span style=display:flex><span>metrics_system_GET{name=SUCCESS_REQUEST,} 2
</span></span><span style=display:flex><span>metrics_system_GET{name=TOTAL_REQUEST,
</span></span><span style=display:flex><span>} 2
</span></span></code></pre></div><h5 id=response-body-7>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=22-method--url>2.2 Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/statistics?type=json
</span></span></code></pre></div><h5 id=response-status-8>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-8>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/POST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;FAILED_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MEAN_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MAX_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>21</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;SUCCESS_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;TOTAL_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/backend/GET&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;FAILED_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MEAN_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>12.6852124529148</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MAX_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;SUCCESS_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;TOTAL_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;system/GET&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;FAILED_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MEAN_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MAX_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;SUCCESS_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;TOTAL_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/gauges/GET&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;FAILED_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MEAN_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MAX_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>7</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;SUCCESS_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;TOTAL_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;favicon.ico/GET&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;FAILED_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MEAN_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MAX_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;SUCCESS_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;TOTAL_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics//GET&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;FAILED_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MEAN_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MAX_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;SUCCESS_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;TOTAL_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;metrics/system/GET&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;FAILED_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MEAN_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>8.942674506664073</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;MAX_RESPONSE_TIME&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>40</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;SUCCESS_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;TOTAL_REQUEST&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h2 id=3system-metrics>3.System Metrics</h2><p>System metrics mainly return the machine metrics, such as memory, threads, and other information.</p><h5 id=method--url-5>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/system
</span></span></code></pre></div><h5 id=response-status-9>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-9>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;basic&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1010</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_total&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>911</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_used&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>239</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_free&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>671</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;MB&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;processors&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>20</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;uptime&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>137503</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;systemload_average&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>-1.0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;heap&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;committed&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>911</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;init&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>254</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;used&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>239</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3596</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nonheap&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;committed&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>98</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;init&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;used&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>95</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;max&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;thread&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;peak&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>82</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;daemon&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>34</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;total_started&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>108</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>82</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;class_loading&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>11495</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;loaded&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>11495</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;unloaded&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>},</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;garbage_collector&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ps_scavenge_count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>16</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ps_scavenge_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>155</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ps_marksweep_count&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>3</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;ps_marksweep_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>494</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;time_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;ms&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><h2 id=4backend-metrics>4.Backend Metrics</h2><p>HugeGraph supports multiple backend storage, with backend metrics including memory, disk, and other
information.</p><h5 id=method--url-6>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/metrics/backend
</span></span></code></pre></div><h5 id=response-status-10>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body-10>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;hugegraph&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;backend&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;rocksdb&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;nodes&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cluster_id&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;local&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;servers&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;local&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;MB&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;disk_unit&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;GB&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_used&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.1</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_used_readable&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;103.53 KB&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;disk_usage&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.03</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;disk_usage_readable&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;29.03 KB&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;block_cache_usage&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.00359344482421875</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;block_cache_pinned_usage&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.00359344482421875</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;block_cache_capacity&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>304.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;estimate_table_readers_mem&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.019697189331054688</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;size_all_mem_tables&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.07421875</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;cur_size_all_mem_tables&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.07421875</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;estimate_live_data_size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>5.536526441574097E-5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;total_sst_files_size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>5.536526441574097E-5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;live_sst_files_size&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>5.536526441574097E-5</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;estimate_pending_compaction_bytes&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0.0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;estimate_num_keys&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_entries_active_mem_table&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_entries_imm_mem_tables&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_deletes_active_mem_table&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_deletes_imm_mem_tables&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_running_flushes&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mem_table_flush_pending&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_running_compactions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;compaction_pending&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_immutable_mem_table&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_snapshots&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;oldest_snapshot_time&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>0</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;num_live_versions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>38</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;current_super_version_number&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>38</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-8e126d4f2f7317a1268d7edb65cd4fcc>5.1.18 - Other API</h1><h3 id=111-other>11.1 Other</h3><h4 id=1111-view-version-information-of-hugegraph>11.1.1 View Version Information of HugeGraph</h4><h5 id=method--url>Method & Url</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/versions
</span></span></code></pre></div><h5 id=response-status>Response Status</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h5 id=response-body>Response Body</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;versions&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;version&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;v1&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;core&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;0.4.5.1&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;gremlin&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;3.2.5&#34;</span><span style=color:#000;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;api&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;0.13.2.0&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#000;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-3457a7585a93814fdbb1a44b68edc0d3>5.2 - HugeGraph Java Client</h1><p>The code in this document is written in <code>java</code>, but its style is very similar to <code>gremlin(groovy)</code>. The user only needs to replace the variable declaration in the code with <code>def</code> or remove it directly,
You can convert <code>java</code> code into <code>groovy</code>; in addition, each line of statement can be without a semicolon at the end, <code>groovy</code> considers a line to be a statement.
The <code>gremlin(groovy)</code> written by the user in <code>HugeGraph-Studio</code> can refer to the <code>java</code> code in this document, and some examples will be given below.</p><h3 id=1-hugegraph-client>1 HugeGraph-Client</h3><p>HugeGraph-Client is the general entry for operating graph. Users must first create a HugeGraph-Client object and establish a connection (pseudo connection) with HugeGraph-Server before they can obtain the operation entry objects of schema, graph and gremlin.</p><p>Currently, HugeGraph-Client only allows connections to existing graphs on the server, and cannot create custom graphs. Its creation method is as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// HugeGraphServer address: &#34;http://localhost:8080&#34;
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Graph Name: &#34;hugegraph&#34;
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>HugeClient</span> <span style=color:#000>hugeClient</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>HugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>builder</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;http://localhost:8080&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;hugegraph&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>configTimeout</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>20</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#8f5902;font-style:italic>// 20s timeout
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>configUser</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;**&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;**&#34;</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#8f5902;font-style:italic>// enable auth
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>build</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><p>If the above process of creating HugeClient fails, an exception will be thrown, and the user needs to use try-catch. If successful, continue to get schema, graph and gremlin manager.</p><p>When operating through <code>gremlin</code> in <code>HugeGraph-Hubble</code>(or <code>HugeGraph-Studio</code>), <code>HugeClient</code> is not required and can be ignored.</p><h3 id=2-schema>2 Schema</h3><h4 id=21-schemamanager>2.1 SchemaManager</h4><p>SchemaManager is used to manage four kinds of schema in HugeGraph, namely PropertyKey (property type), VertexLabel (vertex type), EdgeLabel (edge type) and IndexLabel (index label). A SchemaManager object can be created for schema information definition.</p><p>The user can obtain the SchemaManager object using the following methods:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>SchemaManager</span> <span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugeClient</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><p>Create a <code>schema</code> object via <code>gremlin</code> in <code>HugeGraph-Hubble</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><p>The definition process of the 4 kinds of schema is described below.</p><h4 id=22-propertykey>2.2 PropertyKey</h4><h5 id=221-interface-and-parameter-introduction>2.2.1 Interface and parameter introduction</h5><p>PropertyKey is used to standardize the property constraints of vertices and edges, and properties of properties are not currently supported.</p><p>The constraint information that PropertyKey allows to define includes: name, datatype, cardinality, and userdata, which are introduced one by one below.</p><ul><li>name: The name of the property, used to distinguish different PropertyKeys, PropertyKeys with the same name are not allowed.</li></ul><table><thead><tr><th>interface</th><th>param</th><th>must set</th></tr></thead><tbody><tr><td>propertyKey(String name)</td><td>name</td><td>y</td></tr></tbody></table><ul><li>datatype: property value type, you must select an explicit setting from the following table that conforms to the specific business scenario:</li></ul><table><thead><tr><th>interface</th><th>Java Class</th></tr></thead><tbody><tr><td>asText()</td><td>String</td></tr><tr><td>asInt()</td><td>Integer</td></tr><tr><td>asDate()</td><td>Date</td></tr><tr><td>asUuid()</td><td>UUID</td></tr><tr><td>asBoolean()</td><td>Boolean</td></tr><tr><td>asByte()</td><td>Byte</td></tr><tr><td>asBlob()</td><td>Byte[]</td></tr><tr><td>asDouble()</td><td>Double</td></tr><tr><td>asFloat()</td><td>Float</td></tr><tr><td>asLong()</td><td>Long</td></tr></tbody></table><ul><li>cardinality: Whether the property value is single-valued or multivalued, in the case of multivalued, it is divided into allowing-duplicate values and not-allowing-duplicate values. This item is single by default. If necessary, you can select a setting from the following table:</li></ul><table><thead><tr><th>interface</th><th>cardinality</th><th>description</th></tr></thead><tbody><tr><td>valueSingle()</td><td>single</td><td>single value</td></tr><tr><td>valueList()</td><td>list</td><td>multi-values that allow duplicate value</td></tr><tr><td>valueSet()</td><td>set</td><td>multi-values that not allow duplicate value</td></tr></tbody></table><ul><li>userdata: Users can add some constraints or additional information by themselves, and then check whether the incoming properties satisfy the constraints, or extract additional information when necessary:</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>userdata(String key, Object value)</td><td>The same key, the latter will cover the former</td></tr></tbody></table><h5 id=222-create-propertykey>2.2.2 Create PropertyKey</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>valueSet</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><p>The syntax of creating the above <code>PropertyKey</code> object through <code>gremlin</code> in <code>HugeGraph-Hubble</code> is exactly the same. If the user does not define the <code>schema</code> variable, it should be written like this:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>valueSet</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><p>In the following examples, the syntax of <code>gremlin</code> and <code>java</code> is exactly the same, so we won&rsquo;t repeat them.</p><ul><li>ifNotExist(): Add a judgment mechanism for create, if the current PropertyKey already exists, it will not be created, otherwise the property will be created. If no ifNotExist() is added, an exception will be thrown if a property-key with the same name already exists. The same as below, and will not be repeated there.</li></ul><h5 id=223-delete-propertykey>2.2.3 Delete PropertyKey</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>remove</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h5 id=224-query-propertykey>2.2.4 Query PropertyKey</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get PropertyKey
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getPropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get attributes of PropertyKey
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getPropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>cardinality</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getPropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>dataType</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getPropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>name</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getPropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>userdata</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h4 id=23-vertexlabel>2.3 VertexLabel</h4><h5 id=231-interface-and-parameter-introduction>2.3.1 Interface and parameter introduction</h5><p>VertexLabel is used to define the vertex type and describe the constraint information of the vertex.</p><p>The constraint information that VertexLabel allows to define include: name, idStrategy, properties, primaryKeys and nullableKeys, which are introduced one by one below.</p><ul><li>name: The name of the VertexLabel, used to distinguish different VertexLabels, VertexLabels with the same name are not allowed.</li></ul><table><thead><tr><th>interface</th><th>param</th><th>must set</th></tr></thead><tbody><tr><td>vertexLabel(String name)</td><td>name</td><td>y</td></tr></tbody></table><ul><li>idStrategy: Each VertexLabel can choose its own ID strategy. There are currently three strategies to choose from, namely Automatic (automatically generated), Customize (user input) and PrimaryKey (primary attribute key). Among them, Automatic uses the Snowflake algorithm to generate ID, Customize requires the user to pass in the ID of string or number type, and PrimaryKey allows the user to select several properties of VertexLabel as the basis for differentiation. HugeGraph will be spliced and generated ID according to the value of the primary properties. idStrategy uses Automatic by default, but if the user does not explicitly set idStrategy and calls the primaryKeys(&mldr;) method to set the primary property, then idStrategy will automatically use PrimaryKey.</li></ul><table><thead><tr><th>interface</th><th>idStrategy</th><th>description</th></tr></thead><tbody><tr><td>useAutomaticId</td><td>AUTOMATIC</td><td>generate id automatically by Snowflake algorithm</td></tr><tr><td>useCustomizeStringId</td><td>CUSTOMIZE_STRING</td><td>passed id by user, must be string type</td></tr><tr><td>useCustomizeNumberId</td><td>CUSTOMIZE_NUMBER</td><td>passed id by user, must be number type</td></tr><tr><td>usePrimaryKeyId</td><td>PRIMARY_KEY</td><td>choose some important prop as primary key to splice id</td></tr></tbody></table><ul><li>properties: define the properties of the vertex, the incoming parameter is the name of the PropertyKey.</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>properties(String&mldr; properties)</td><td>allow to pass multi properties</td></tr></tbody></table><ul><li>primaryKeys: When the user selects the ID strategy of PrimaryKey, several primary properties need to be selected from the properties of VertexLabel as the basis for differentiation;</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>primaryKeys(String&mldr; keys)</td><td>allow to choose multi prop as primaryKeys</td></tr></tbody></table><p>Note that the selection of the ID strategy and the setting of primaryKeys have some mutual constraints, which cannot be called at will. The constraints are shown in the following table:</p><table><thead><tr><th></th><th>useAutomaticId</th><th>useCustomizeStringId</th><th>useCustomizeNumberId</th><th>usePrimaryKeyId</th></tr></thead><tbody><tr><td>unset primaryKeys</td><td>AUTOMATIC</td><td>CUSTOMIZE_STRING</td><td>CUSTOMIZE_NUMBER</td><td>ERROR</td></tr><tr><td>set primaryKeys</td><td>ERROR</td><td>ERROR</td><td>ERROR</td><td>PRIMARY_KEY</td></tr></tbody></table><ul><li>nullableKeys: For properties set by the properties(&mldr;) method, all of them are non-nullable by default, that is, the property must be assigned a value when creating a vertex, which may impose too strict integrity requirements on user data. In order to avoid such strong constraints, the user can set some properties to be nullable through this method, so that the properties can be unassigned when adding vertices.</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>nullableKeys(String&mldr; properties)</td><td>allow to pass multi props</td></tr></tbody></table><p>Note: primaryKeys and nullableKeys cannot intersect, because a property cannot be both primary and nullable.</p><ul><li>enableLabelIndex: The user can specify whether to create an index for the label. If you don&rsquo;t create it, you can&rsquo;t globally search for the vertices and edges of the specified label. If you create it, you can search globally, like <code>g.V().hasLabel('person'), g.E().has('label', 'person')</code> query, but the performance will be slower when inserting data, and it will take up more storage space. This defaults to true.</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>enableLabelIndex(boolean enable)</td><td>Whether to create a label index</td></tr></tbody></table><ul><li>userdata: Users can add some constraints or additional information by themselves, and then check whether the incoming properties meet the constraints, or extract additional information when necessary.</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>userdata(String key, Object value)</td><td>The same key, the latter will cover the former</td></tr></tbody></table><h5 id=232-create-vertexlabel>2.3.2 Create VertexLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Use Automatic Id strategy
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>useAutomaticId</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Use Customize_String Id strategy
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>useCustomizeStringId</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Use Customize_Number Id strategy
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>useCustomizeNumberId</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Use PrimaryKey Id strategy
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>usePrimaryKeyId</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h5 id=233-update-vertexlabel>2.3.3 Update VertexLabel</h5><p>VertexLabel can append constraints, but only properties and nullableKeys, and the appended properties must also be added to the nullableKeys collection.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>append</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h5 id=234-delete-vertexlabel>2.3.4 Delete VertexLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>remove</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h5 id=235-query-vertexlabel>2.3.5 Query VertexLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get VertexLabel
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get attributes of VertexLabel
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>idStrategy</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>name</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>userdata</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h4 id=24-edgelabel>2.4 EdgeLabel</h4><h5 id=241-interface-and-parameter-introduction>2.4.1 Interface and parameter introduction</h5><p>EdgeLabel is used to define the edge type and describe the constraint information of the edge.</p><p>The constraint information that EdgeLabel allows to define include: name, sourceLabel, targetLabel, frequency, properties, sortKeys and nullableKeys, which are introduced one by one below.</p><ul><li>name: The name of the EdgeLabel, used to distinguish different EdgeLabels, EdgeLabels with the same name are not allowed.</li></ul><table><thead><tr><th>interface</th><th>param</th><th>must set</th></tr></thead><tbody><tr><td>edgeLabel(String name)</td><td>name</td><td>y</td></tr></tbody></table><ul><li><p>sourceLabel: The name of the source vertex type of the edge link, only one is allowed;</p></li><li><p>targetLabel: The name of the target vertex type of the edge link, only one is allowed;</p></li></ul><table><thead><tr><th>interface</th><th>param</th><th>must set</th></tr></thead><tbody><tr><td>sourceLabel(String label)</td><td>label</td><td>y</td></tr><tr><td>targetLabel(String label)</td><td>label</td><td>y</td></tr></tbody></table><ul><li>frequency: Indicating the number of times a relationship occurs between two specific vertices, which can be single (single) or multiple (frequency), the default is single.</li></ul><table><thead><tr><th>interface</th><th>frequency</th><th>description</th></tr></thead><tbody><tr><td>singleTime()</td><td>single</td><td>a relationship can only occur once</td></tr><tr><td>multiTimes()</td><td>multiple</td><td>a relationship can occur many times</td></tr></tbody></table><ul><li>properties: Define the properties of the edge.</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>properties(String&mldr; properties)</td><td>allow to pass multi props</td></tr></tbody></table><ul><li>sortKeys: When the frequency of EdgeLabel is multiple, some properties are needed to distinguish the multiple relationships, so sortKeys (sorted keys) is introduced;</li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>sortKeys(String&mldr; keys)</td><td>allow to choose multi prop as sortKeys</td></tr></tbody></table><ul><li>nullableKeys: Consistent with the concept of nullableKeys in vertices.</li></ul><p>Note: sortKeys and nullableKeys also cannot intersect.</p><ul><li><p>enableLabelIndex: It is consistent with the concept of enableLabelIndex in the vertex.</p></li><li><p>userdata: Users can add some constraints or additional information by themselves, and then check whether the incoming properties meet the constraints, or extract additional information when necessary.</p></li></ul><table><thead><tr><th>interface</th><th>description</th></tr></thead><tbody><tr><td>userdata(String key, Object value)</td><td>The same key, the latter will cover the former</td></tr></tbody></table><h5 id=242-create-edgelabel>2.4.2 Create EdgeLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>multiTimes</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sortKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h5 id=243-update-edgelabel>2.4.3 Update EdgeLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>append</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h5 id=244-delete-edgelabel>2.4.4 Delete EdgeLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>remove</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h5 id=245-query-edgelabel>2.4.5 Query EdgeLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get EdgeLabel
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get attributes of EdgeLabel
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>frequency</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sourceLabel</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>targetLabel</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>sortKeys</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>name</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>userdata</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h4 id=25-indexlabel>2.5 IndexLabel</h4><h5 id=251-interface-and-parameter-introduction>2.5.1 Interface and parameter introduction</h5><p>IndexLabel is used to define the index type and describe the constraint information of the index, mainly for the convenience of query.</p><p>The constraint information that IndexLabel allows to define include: name, baseType, baseValue, indexFields, indexType, which are introduced one by one below.</p><ul><li>name: The name of the IndexLabel, used to distinguish different IndexLabels, IndexLabels with the same name are not allowed.</li></ul><table><thead><tr><th>interface</th><th>param</th><th>must set</th></tr></thead><tbody><tr><td>indexLabel(String name)</td><td>name</td><td>y</td></tr></tbody></table><ul><li><p>baseType: Indicates whether to index VertexLabel or EdgeLabel, used in conjunction with the baseValue below.</p></li><li><p>baseValue: Specifies the name of the VertexLabel or EdgeLabel to be indexed.</p></li></ul><table><thead><tr><th>interface</th><th>param</th><th>description</th></tr></thead><tbody><tr><td>onV(String baseValue)</td><td>baseValue</td><td>build index for VertexLabel: &lsquo;baseValue&rsquo;</td></tr><tr><td>onE(String baseValue)</td><td>baseValue</td><td>build index for EdgeLabel: &lsquo;baseValue&rsquo;</td></tr></tbody></table><ul><li>indexFields: on which fields to index, it can be a joint index for multiple columns.</li></ul><table><thead><tr><th>interface</th><th>param</th><th>description</th></tr></thead><tbody><tr><td>by(String&mldr; fields)</td><td>files</td><td>allow to build index for multi fields for secondary index</td></tr></tbody></table><ul><li>indexType: There are currently five types of indexes established, namely Secondary, Range, Search, Shard and Unique.<ul><li>Secondary Index supports exact matching secondary index, allow to build joint index, joint index supports index prefix search<ul><li>Single Property Secondary Index, support equality query, for example: the secondary index of the city property of the person vertex, you can use <code>g.V().has("city", "Beijing")</code> to query all the vertices with &ldquo;city attribute value is Beijing&rdquo;</li><li>Joint Secondary Index, supports prefix query and equality query, such as: joint index of city and street properties of person vertex, you can use <code>g.V().has("city", "Beijing").has('street', 'Zhongguancun street ')</code> to query all vertices of &ldquo;city property value is Beijing and street property value is ZhongGuanCun&rdquo;, or <code>g.V().has("city", "Beijing")</code> to query all vertices of &ldquo;city property value is Beijing&rdquo;.</li></ul><blockquote><p>The query of Secondary Index is based on the query condition of &ldquo;yes&rdquo; or &ldquo;equal&rdquo;, and does not support &ldquo;partial matching&rdquo;.</p></blockquote></li><li>Range Index supports for range queries of numeric types<ul><li>Must be a single number or date attribute, for example: the range index of the age property of the person vertex, you can use <code>g.V().has("age", P.gt(18))</code> to query the vertices with &ldquo;age property value greater than 18&rdquo; . In addition to <code>P.gt()</code>, also supports <code>P.gte()</code>, <code>P.lte()</code>, <code>P.lt()</code>, <code>P.eq()</code>, <code>P.between() </code>, <code>P.inside()</code> and <code>P.outside()</code> etc.</li></ul></li><li>Search Index supports full-text search<ul><li>It must be a single text property, such as: full-text index of the address property of the person vertex, you can use <code>g.V().has("address", Text.contains('building')</code> to query all vertices whose &ldquo;address property contains a &lsquo;building&rsquo;&rdquo;</li></ul><blockquote><p>The query of the Search Index is based on the query condition of &ldquo;is&rdquo; or &ldquo;contains&rdquo;.</p></blockquote></li><li>Shard Index supports prefix matching + numeric range query<ul><li>The shard index of N properties supports range queries with equal prefixes. For example, the shard index of the city and age properties of the person vertex can use <code>g.V().has("city", "Beijing").has ("age", P.between(18, 30))</code>Query &ldquo;city property is Beijing and all vertices whose age is greater than or equal to 18 and less than 30&rdquo;.</li><li>When all N properties are text properties in a Shard Index, it is equivalent to Secondary Index.</li><li>When there is only one single number or date property in a Shard Index, it is equivalent to the Range Index.</li></ul><blockquote><p>Shard Index can have any number or date property, but at most one range search condition can be provided when querying, and the prefix properties of the Shard Search conditions must be &ldquo;equals&rdquo;.</p></blockquote></li><li>Unique Index supports properties uniqueness constraints, that is, the value of properties can be limited to not repeat, and joint indexing is allowed, but querying is not supported now<ul><li>The unique index of single or multiple properties cannot be used for query, only the value of the property can be limited, and an error will be reported when there is a duplicate value.</li></ul></li></ul></li></ul><table><thead><tr><th>interface</th><th>indexType</th><th>description</th></tr></thead><tbody><tr><td>secondary()</td><td>Secondary</td><td>support prefix search</td></tr><tr><td>range()</td><td>Range</td><td>support range(numeric or date type) search</td></tr><tr><td>search()</td><td>Search</td><td>support full text search</td></tr><tr><td>shard()</td><td>Shard</td><td>support prefix + range(numeric or date type) search</td></tr><tr><td>unique()</td><td>Unique</td><td>support unique props value, not support search</td></tr></tbody></table><h5 id=252-create-indexlabel>2.5.2 Create IndexLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>range</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;createdByDate&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;date&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>secondary</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByLived&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onE</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lived&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>search</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByCityAndAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>shard</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personById&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>onV</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>unique</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span></code></pre></div><h5 id=253-delete-indexlabel>2.5.3 Delete IndexLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>indexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>remove</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h5 id=254-query-indexlabel>2.5.4 Query IndexLabel</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get IndexLabel
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// Get attributes of IndexLabel
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>baseType</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>baseValue</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>indexFields</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>indexType</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;personByAge&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>name</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h3 id=3-graph>3 Graph</h3><h4 id=31-vertex>3.1 Vertex</h4><p>Vertices are the most basic elements of a graph, and there can be many vertices in a graph. Here is an example of adding vertices:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>marko</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>29</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>lop</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;software&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lop&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lang&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;price&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>328</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span></code></pre></div><ul><li>The key to adding vertices is the vertex properties. The number of parameters of the vertex adding function must be an even number and satisfy the order of <code>key1 -> val1, key2 -> val2 ...</code>, and the order between key-value pairs is free .</li><li>The parameter must contain a special key-value pair, namely <code>T.label -> "val"</code>, which is used to define the category of the vertex, so that the program can obtain the schema definition of the VertexLabel from the cache or backend, and then do subsequent constraint checks. The label in the example is defined as person.</li><li>If the vertex type&rsquo;s ID policy is <code>AUTOMATIC</code>, users are not allowed to pass in id key-value pairs.</li><li>If the ID policy of the vertex type is <code>CUSTOMIZE_STRING</code>, the user needs to pass in the value of the id of the String type. The key-value pair is like: <code>"T.id", "123456"</code>.</li><li>If the ID policy of the vertex type is <code>CUSTOMIZE_NUMBER</code>, the user needs to pass in the value of the id of the Number type. The key-value pair is like: <code>"T.id", 123456</code>.</li><li>If the ID policy of the vertex type is <code>PRIMARY_KEY</code>, the parameters must also contain the name and value of the properties corresponding to the <code>primaryKeys</code>, if not set an exception will be thrown. For example, the <code>primaryKeys</code> of <code>person</code> is <code>name</code>, in the example, the value of <code>name</code> is set to <code>marko</code>.</li><li>For properties that are not nullableKeys, a value must be assigned.</li><li>The remaining parameters are the settings of other properties of the vertex, but they are not required.</li><li>After calling the <code>addVertex</code> method, the vertices are inserted into the backend storage system immediately.</li></ul><h4 id=32-edge>3.2 Edge</h4><p>After added vertices, edges are also needed to form a complete graph. Here is an example of adding edges:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>Edge</span> <span style=color:#000>knows1</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;knows&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span></code></pre></div><ul><li>The function <code>addEdge()</code> of the (source) vertex is to add an edge(relationship) between itself and another vertex. The first parameter of the function is the label of the edge, and the second parameter is the target vertex. The position and order of these two parameters are fixed. The subsequent parameters are the order of <code>key1 -> val1, key2 -> val2 ...</code>, set the properties of the edge, and the key-value pair order is free.</li><li>The source and target vertices must conform to the definitions of source-label and target label in EdgeLabel, and cannot be added arbitrarily.</li><li>For properties that are not nullableKeys, a value must be assigned.</li></ul><p><strong>Note: When frequency is multiple, the value of the property type corresponding to sortKeys must be set.</strong></p><h3 id=4-examples>4 Examples</h3><p>Simple examples can reference <a href=/docs/quickstart/hugegraph-client>HugeGraph-Client</a></p></div><div class=td-content style=page-break-before:always><h1 id=pg-1ebf9ecb86d8a6b8536fd581e696ce8c>5.3 - Gremlin-Console</h1><p>Gremlin-Console is an interactive client developed by TinkerPop. Users can use this client to perform various operations on Graph. There are two main usage modes:</p><ul><li>Stand-alone offline mode</li><li>Client/Server mode</li></ul><p><strong>Note: Gremlin-Console is only for users to quickly get started and experience, it is not recommended for use in production environments.</strong></p><h3 id=1-stand-alone-offline-mode>1 Stand-alone offline mode</h3><p>Since the lib directory already contains the HugeCore jar package, and HugeGraph-Server has been registered in the Console as a plug-in, the users can write a groovy script directly to call the code of HugeGraph-Core, and then hand it over to the parsing engine in Gremlin-Console for execution. As a result, the users can operate the graph <strong>without</strong> starting the Server.</p><p>Here is an example, first modify the <code>hugegraph.properties</code> configuration to use the Memory backend (using other backends may encounter some initialization issues):</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=memory
</span></span><span style=display:flex><span>serializer=text
</span></span></code></pre></div><p>Then enter the following command:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>&gt; ./bin/gremlin-console.sh -- -i scripts/example.groovy
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>\,</span>,,/
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>(</span>o o<span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>-----oOOo-<span style=color:#ce5c00;font-weight:700>(</span>3<span style=color:#ce5c00;font-weight:700>)</span>-oOOo-----
</span></span><span style=display:flex><span>plugin activated: HugeGraph
</span></span><span style=display:flex><span>plugin activated: tinkerpop.server
</span></span><span style=display:flex><span>plugin activated: tinkerpop.utilities
</span></span><span style=display:flex><span>plugin activated: tinkerpop.tinkergraph
</span></span><span style=display:flex><span>main dict load finished, <span style=color:#204a87>time</span> elapsed <span style=color:#0000cf;font-weight:700>644</span> ms
</span></span><span style=display:flex><span>model load finished, <span style=color:#204a87>time</span> elapsed <span style=color:#0000cf;font-weight:700>35</span> ms.
</span></span><span style=display:flex><span>&gt;&gt;&gt;&gt; query all vertices: <span style=color:#000>size</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#0000cf;font-weight:700>6</span>
</span></span><span style=display:flex><span>&gt;&gt;&gt;&gt; query all edges: <span style=color:#000>size</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#0000cf;font-weight:700>6</span>
</span></span><span style=display:flex><span>gremlin&gt;
</span></span></code></pre></div><blockquote><p>The <code>--</code> here will be parsed by getopts as the last option, allowing the subsequent options to be passed to Gremlin-Console for processing. <code>-i</code> represents <code>Execute the specified script and leave the console open on completion</code>. For more options, you can refer to the <a href=https://github.com/apache/tinkerpop/blob/3.5.1/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy#L483>source code</a> of Gremlin-Console.</p></blockquote><p><a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/scripts/example.groovy><code>example.groovy</code></a> is an example script under the <code>scripts</code> directory. This script inserts some data and queries the number of vertices and edges in the graph at the end.</p><p>You can continue to enter Gremlin statements to operate on the graph:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>v</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>v</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>v</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>v</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>v</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>v</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>E</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>S1:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>&gt;&gt;</span><span style=color:#f57900>S2:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>][</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>created</span><span style=color:#ce5c00;font-weight:700>-&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>S1:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>&gt;&gt;</span><span style=color:#f57900>S2:</span><span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>][</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>created</span><span style=color:#ce5c00;font-weight:700>-&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>S1:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>&gt;</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>&gt;&gt;</span><span style=color:#f57900>S1:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>][</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>knows</span><span style=color:#ce5c00;font-weight:700>-&gt;</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>S1:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>&gt;</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>&gt;&gt;</span><span style=color:#f57900>S1:</span><span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>][</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>knows</span><span style=color:#ce5c00;font-weight:700>-&gt;</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>S1:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>&gt;&gt;</span><span style=color:#f57900>S2:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>][</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>created</span><span style=color:#ce5c00;font-weight:700>-&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>S1:</span><span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>&gt;&gt;</span><span style=color:#f57900>S2:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>][</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>created</span><span style=color:#ce5c00;font-weight:700>-&gt;</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span>
</span></span></code></pre></div><p>For more Gremlin statements, please refer to <a href=http://tinkerpop.apache.org/docs/current/reference/>Tinkerpop Official Website</a></p><h3 id=2-clientserver-mode>2 Client/Server mode</h3><p>Because Gremlin-Console can only connect to HugeGraph-Server through WebSocket, HugeGraph-Server provides HTTP connections by default, so modify the configuration of gremlin-server first.</p><p><strong>NOTE: After changing the connection method to WebSocket, HugeGraph-Client, HugeGraph-Loader, HugeGraph-Hubble and other supporting tools cannot be used.</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#8f5902;font-style:italic># vim conf/gremlin-server.yaml</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic># ......</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic># If you want to start gremlin-server for gremlin-console (web-socket),</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic># please change `HttpChannelizer` to `WebSocketChannelizer` or comment this line.</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>channelizer</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.tinkerpop.gremlin.server.channel.HttpChannelizer</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic># ......</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><p>Modify <code>channelizer: org.apache.tinkerpop.gremlin.server.channel.HttpChannelizer</code> to <code>channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer</code> or comment directly, and then follow the <a href=/docs/quickstart/hugegraph-server/>steps</a> to start the Server.</p><p>Then enter Gremlin-Console:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>&gt; ./bin/gremlin-console.sh
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>\,</span>,,/
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>(</span>o o<span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>-----oOOo-<span style=color:#ce5c00;font-weight:700>(</span>3<span style=color:#ce5c00;font-weight:700>)</span>-oOOo-----
</span></span><span style=display:flex><span>plugin activated: HugeGraph
</span></span><span style=display:flex><span>plugin activated: tinkerpop.server
</span></span><span style=display:flex><span>plugin activated: tinkerpop.utilities
</span></span><span style=display:flex><span>plugin activated: tinkerpop.tinkergraph
</span></span></code></pre></div><p>To connect to the server, you need to specify the connection parameters in the configuration file, and there is a default <code>remote.yaml</code> file in the conf directory</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#8f5902;font-style:italic># cat conf/remote.yaml</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>hosts</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#000>localhost]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>port</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#0000cf;font-weight:700>8182</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>serializer</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>className</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>config</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span>{<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>serializeResultToString</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>false</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>ioRegistries</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000;font-weight:700>[</span><span style=color:#000>org.apache.hugegraph.io.HugeGraphIoRegistry]</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span>}<span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>remote</span> <span style=color:#000>connect</span> <span style=color:#000>tinkerpop</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>server</span> <span style=color:#000>conf</span><span style=color:#4e9a06>/remote.yaml
</span></span></span><span style=display:flex><span><span style=color:#4e9a06>==&gt;Configured localhost/</span><span style=color:#0000cf;font-weight:700>127.0</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#0000cf;font-weight:700>0.1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#0000cf;font-weight:700>8182</span>
</span></span></code></pre></div><p>After a successful connection, if the sample graph <code>example.groovy</code> is imported during the startup of HugeGraph-Server, you can directly perform queries in the console.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#ce5c00;font-weight:700>:&gt;</span> <span style=color:#000>hugegraph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>traversal</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;[</span><span style=color:#f57900>id:</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>label:</span><span style=color:#000>software</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>type:</span><span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>properties:</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>name:</span><span style=color:#000>lop</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>lang:</span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>price:</span><span style=color:#0000cf;font-weight:700>328</span><span style=color:#ce5c00;font-weight:700>]]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;[</span><span style=color:#f57900>id:</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>label:</span><span style=color:#000>person</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>type:</span><span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>properties:</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>name:</span><span style=color:#000>josh</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>age:</span><span style=color:#0000cf;font-weight:700>32</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>city:</span><span style=color:#000>Beijing</span><span style=color:#ce5c00;font-weight:700>]]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;[</span><span style=color:#f57900>id:</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>label:</span><span style=color:#000>person</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>type:</span><span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>properties:</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>name:</span><span style=color:#000>marko</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>age:</span><span style=color:#0000cf;font-weight:700>29</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>city:</span><span style=color:#000>Beijing</span><span style=color:#ce5c00;font-weight:700>]]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;[</span><span style=color:#f57900>id:</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>label:</span><span style=color:#000>person</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>type:</span><span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>properties:</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>name:</span><span style=color:#000>peter</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>age:</span><span style=color:#0000cf;font-weight:700>35</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>city:</span><span style=color:#000>Shanghai</span><span style=color:#ce5c00;font-weight:700>]]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;[</span><span style=color:#f57900>id:</span><span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>label:</span><span style=color:#000>person</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>type:</span><span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>properties:</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>name:</span><span style=color:#000>vadas</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>age:</span><span style=color:#0000cf;font-weight:700>27</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>city:</span><span style=color:#000>Hongkong</span><span style=color:#ce5c00;font-weight:700>]]</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;[</span><span style=color:#f57900>id:</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>label:</span><span style=color:#000>software</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>type:</span><span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>properties:</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#f57900>name:</span><span style=color:#000>ripple</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>lang:</span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#f57900>price:</span><span style=color:#0000cf;font-weight:700>199</span><span style=color:#ce5c00;font-weight:700>]]</span>
</span></span></code></pre></div><blockquote><p>NOTE: In Client/Server mode, all operations related to the Server should be prefixed with <code>:> </code>. If not added, it indicates local console operations.</p></blockquote><p>You can also put multiple statements in a single string variable and send them to the Server at once:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>script</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#4e9a06>&#34;&#34;&#34;
</span></span></span><span style=display:flex><span><span style=color:#4e9a06>......1&gt; graph = hugegraph;
</span></span></span><span style=display:flex><span><span style=color:#4e9a06>......2&gt; g = graph.traversal();
</span></span></span><span style=display:flex><span><span style=color:#4e9a06>......3&gt; g.V().toList().size();
</span></span></span><span style=display:flex><span><span style=color:#4e9a06>......4&gt; &#34;&#34;&#34;</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span>
</span></span><span style=display:flex><span><span style=color:#000>graph</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugegraph</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#000>g</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>traversal</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>toList</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>size</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#ce5c00;font-weight:700>:&gt;</span> <span style=color:#5c35cc;font-weight:700>@script</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>==&gt;</span><span style=color:#0000cf;font-weight:700>6</span>
</span></span><span style=display:flex><span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>&gt;</span>
</span></span></code></pre></div><p>For more information on the use of Gremlin-Console, please refer to <a href=http://tinkerpop.apache.org/docs/current/reference/>Tinkerpop Official Website</a></p></div><div class=td-content style=page-break-before:always><h1 id=pg-d2c6535126cca927d2a9c893abde92a0>6 - GUIDES</h1></div><div class=td-content><h1 id=pg-dcb89d888ea6f4146ace522d76fe2776>6.1 - HugeGraph Architecture Overview</h1><h3 id=1-overview>1 Overview</h3><p>As a general-purpose graph database product, HugeGraph needs to possess basic graph database functionality. HugeGraph supports two types of graph computation: OLTP and OLAP. For OLTP, it implements the <a href=https://tinkerpop.apache.org>Apache TinkerPop3</a> framework and supports the <a href=https://tinkerpop.apache.org/gremlin.html>Gremlin</a> and <a href=https://en.wikipedia.org/wiki/Cypher>Cypher</a> query languages. It comes with a complete application toolchain and provides a plugin-based backend storage driver framework.</p><p>Below is the overall architecture diagram of HugeGraph:</p><div style=text-align:center><img src=/docs/images/design/architectural-revised.png alt=image></div><p>HugeGraph consists of three layers of functionality: the application layer, the graph engine layer, and the storage layer.</p><ul><li>Application Layer:<ul><li><a href=/docs/quickstart/hugegraph-hubble/>Hubble</a>: An all-in-one visual analytics platform that covers the entire process of data modeling, rapid data import, online and offline analysis of data, and unified management of graphs. It provides a guided workflow for operating graph applications.</li><li><a href=/docs/quickstart/hugegraph-loader/>Loader</a>: A data import component that can transform data from various sources into vertices and edges and bulk import them into the graph database.</li><li><a href=/docs/quickstart/hugegraph-tools/>Tools</a>: Command-line tools for deploying, managing, and backing up/restoring data in HugeGraph.</li><li><a href=/docs/quickstart/hugegraph-computer/>Computer</a>: A distributed graph processing system (OLAP) that implements <a href=https://kowshik.github.io/JPregel/pregel_paper.pdf>Pregel</a>. It can run on Kubernetes.</li><li><a href=/docs/quickstart/hugegraph-client/>Client</a>: HugeGraph client written in Java. Users can use the client to operate HugeGraph using Java code. Support for other languages such as Python, Go, and C++ may be provided in the future.</li></ul></li><li><a href=/docs/quickstart/hugegraph-server/>Graph Engine Layer</a>:<ul><li>REST Server: Provides a RESTful API for querying graph/schema information, supports the <a href=https://tinkerpop.apache.org/gremlin.html>Gremlin</a> and <a href=https://en.wikipedia.org/wiki/Cypher>Cypher</a> query languages, and offers APIs for service monitoring and operations.</li><li>Graph Engine: Supports both OLTP and OLAP graph computation types, with OLTP implementing the <a href=https://tinkerpop.apache.org>Apache TinkerPop3</a> framework.</li><li>Backend Interface: Implements the storage of graph data to the backend.</li></ul></li><li>Storage Layer:<ul><li>Storage Backend: Supports multiple built-in storage backends (RocksDB/MySQL/HBase/&mldr;) and allows users to extend custom backends without modifying the existing source code.</li></ul></li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-3d0f9ef831ef5d7d11acfb09140359fa>6.2 - HugeGraph Design Concepts</h1><h3 id=1-property-graph>1. Property Graph</h3><p>There are two common graph data representation models, namely the RDF (Resource Description Framework) model and the Property Graph (Property Graph) model.
Both RDF and Property Graph are the most basic and well-known graph representation modes, and both can represent entity-relationship modeling of various graphs.
RDF is a W3C standard, while Property Graph is an industry standard and is widely supported by graph database vendors. HugeGraph currently uses Property Graph.</p><p>The storage concept model corresponding to HugeGraph is also designed with reference to Property Graph. For specific examples, see the figure below:
( This figure is outdated for the old version design, please ignore it and update it later )</p><p><img src=/docs/images/design/PropertyGraph.png alt=image></p><p>Inside HugeGraph, each vertex/edge is identified by a unique VertexId/EdgeId, and the attributes are stored inside the corresponding vertex/edge.
The relationship/mapping between vertices is stored through edges.</p><p>When the vertex attribute value is stored by edge pointer, if you want to update a vertex-specific attribute value, you can directly write it by overwriting.
The disadvantage is that the VertexId is redundantly stored; if you want to update the attribute of the relationship, you need to use the read-and-modify method ,
read all attributes first, modify some attributes, and then write to the storage system, the update efficiency is low. According to experience, there are more
requirements for modifying vertex attributes, but less for edge attributes. For example, calculations such as PageRank and Graph Cluster require frequent
modification of vertex attribute values.</p><h3 id=2-graph-partition-scheme>2. Graph Partition Scheme</h3><p>For distributed graph databases, there are two partition storage methods for graphs: Edge Cut and Vertex Cut, as shown in the following figure. When using the
Edge Cut method to store graphs, any vertex will only appear on one machine, while edges may be distributed on different machines. This storage method may lead
to multiple storage of edges. When using the Vertex Cut method to store graphs, any edge will only appear on one machine, and each same point may be distributed
to different machines. This storage method may result in multiple storage of vertices.</p><p><img src=/docs/images/design/GraphCut.png alt=image></p><p>The EdgeCut partition scheme can support high-performance insert and update operations, while the VertexCut partition scheme is more suitable for static graph query
analysis, so EdgeCut is suitable for OLTP graph query, and VertexCut is more suitable for OLAP graph query. HugeGraph currently adopts the partition scheme of EdgeCut.</p><h3 id=3-vertexid-strategy>3. VertexId Strategy</h3><p>Vertex of HugeGraph supports three ID strategies. Different VertexLabels in the same graph database can use different Id strategies. Currently, the Id strategies
supported by HugeGraph are:</p><ul><li>Automatic generation (AUTOMATIC): Use the Snowflake algorithm to automatically generate a globally unique Id, Long type;</li><li>Primary Key (PRIMARY_KEY): Generate Id through VertexLabel+PrimaryKeyValues, String type;</li><li>Custom (CUSTOMIZE_STRING|CUSTOMIZE_NUMBER): User-defined Id, which is divided into two types: String and Long, and you need to ensure the uniqueness of the Id yourself;</li></ul><p>The default Id policy is AUTOMATIC, if the user calls the primaryKeys() method and sets the correct PrimaryKeys, the PRIMARY_KEY policy is automatically enabled.
After enabling the PRIMARY_KEY strategy, HugeGraph can implement data deduplication based on PrimaryKeys.</p><ol><li>AUTOMATIC ID Policy</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>useAutomaticId</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>18</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span></code></pre></div><ol start=2><li>PRIMARY_KEY ID policy</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>usePrimaryKeyId</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>18</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span></code></pre></div><ol start=3><li>CUSTOMIZE_STRING ID Policy</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>useCustomizeStringId</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;123456&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>18</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span></code></pre></div><ol start=4><li>CUSTOMIZE_NUMBER ID Policy</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>useCustomizeNumberId</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;person&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>id</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>123456</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;marko&#34;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>18</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;city&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Beijing&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span></code></pre></div><p>If users need Vertex deduplication, there are three options:</p><ol><li>Adopt PRIMARY_KEY strategy, automatic overwriting, suitable for batch insertion of large amount of data, users cannot know whether overwriting has occurred</li><li>Adopt AUTOMATIC strategy, read-and-modify, suitable for small data insertion, users can clearly know whether overwriting occurs</li><li>Using the CUSTOMIZE_STRING or CUSTOMIZE_NUMBER strategy, the user guarantees the uniqueness</li></ol><h3 id=4-edgeid-policy>4. EdgeId policy</h3><p>The EdgeId of HugeGraph is composed of <code>srcVertexId</code> + <code>edgeLabel</code> + <code>sortKey</code> + <code>tgtVertexId</code>. Among them <code>sortKey</code> is an important concept of HugeGraph.
There are two reasons for adding Edge sortKeyas the unique ID of Edge:</p><ol><li>If there are multiple edges of the same Label between two vertices, they can be sortKeydistinguished by</li><li>For SuperNode nodes, it can be sortKeysorted and truncated by.</li></ol><p>Since EdgeId is composed of <code>srcVertexId</code> + <code>edgeLabel</code> + <code>sortKey</code> + <code>tgtVertexId</code>, HugeGraph will automatically overwrite when the same Edge is inserted
multiple times to achieve deduplication. It should be noted that the properties of Edge will also be overwritten in the batch insert mode.</p><p>In addition, because HugeGraph&rsquo;s EdgeId adopts an automatic deduplication strategy, HugeGraph considers that there is only one edge in the case of self-loop
(a vertex has an edge pointing to itself). The graph has two edges.</p><blockquote><p>The edges of HugeGraph only support directed edges, and undirected edges can be realized by creating two edges, Out and In.</p></blockquote><h3 id=5-hugegraph-transaction-overview>5. HugeGraph transaction overview</h3><h5 id=tinkerpop-transaction-overview>TinkerPop transaction overview</h5><p>A TinkerPop transaction refers to a unit of work that performs operations on the database. A set of operations within a transaction either succeeds or all fail. For a detailed introduction, please refer to the official documentation of TinkerPop: <a href=http://tinkerpop.apache.org/docs/current/reference/#transactions>http://tinkerpop.apache.org/docs/current/reference/#transactions</a>:http://tinkerpop.apache.org/docs/current/reference/#transactions</p><h5 id=tinkerpop-transaction-overview-1>TinkerPop transaction overview</h5><ul><li>open open transaction</li><li>commit commit transaction</li><li>rollback rollback transaction</li><li>close closes the transaction</li></ul><h5 id=tinkerpop-transaction-specification>TinkerPop transaction specification</h5><ul><li>The transaction must be explicitly committed before it can take effect (the modification operation can only be seen by the query in this transaction if it is not committed)</li><li>A transaction must be opened before it can be committed or rolled back</li><li>If the transaction setting is automatically turned on, there is no need to explicitly turn it on (the default method), if it is set to be turned on manually, it must be turned on explicitly</li><li>When the transaction is closed, you can set three modes: automatic commit, automatic rollback (default mode), manual (explicit shutdown is prohibited), etc.</li><li>The transaction must be closed after committing or rolling back</li><li>The transaction must be open after the query</li><li>Transactions (non-threaded tx) must be thread-isolated, and multi-threaded operations on the same transaction do not affect each other</li></ul><p>For more transaction specification use cases, see: <a href=https://github.com/apache/tinkerpop/blob/master/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/TransactionTest.java>Transaction Test</a></p><h5 id=hugegraph-transaction-implementation>HugeGraph transaction implementation</h5><ul><li>All operations in a transaction either succeed or fail</li><li>A transaction can only read what has been committed by another transaction (Read committed)</li><li>All uncommitted operations can be queried in this transaction, including:<ul><li>Adding a vertex can query the vertex</li><li>Delete a vertex to filter out the vertex</li><li>Deleting a vertex can filter out the related edges of the vertex</li><li>Adding an edge can query the edge</li><li>Delete edge can filter out the edge</li><li>Adding/modifying (vertex, edge) attributes can take effect when querying</li><li>Delete (vertex, edge) attributes can take effect at query time</li></ul></li><li>All uncommitted operations become invalid after the transaction is rolled back, including:<ul><li>Adding and deleting vertices and edges</li><li>Addition/modification, deletion of attributes</li></ul></li></ul><p>Example: One transaction cannot read another transaction&rsquo;s uncommitted content</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>testUncommittedTx</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#204a87;font-weight:700>final</span> <span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#204a87;font-weight:700>throws</span> <span style=color:#000>InterruptedException</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>final</span> <span style=color:#000>CountDownLatch</span> <span style=color:#000>latchUncommit</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>CountDownLatch</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>final</span> <span style=color:#000>CountDownLatch</span> <span style=color:#000>latchRollback</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>CountDownLatch</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Thread</span> <span style=color:#000>thread</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Thread</span><span style=color:#ce5c00;font-weight:700>(()</span> <span style=color:#ce5c00;font-weight:700>-&gt;</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// this is a new transaction in the new thread
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>tx</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>open</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;current transaction operations&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>james</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;author&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;id&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;James Gosling&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>62</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;lived&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;Canadian&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>Vertex</span> <span style=color:#000>java</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;language&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;java&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;versions&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>Arrays</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>asList</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>6</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>7</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>8</span><span style=color:#ce5c00;font-weight:700>));</span>
</span></span><span style=display:flex><span> <span style=color:#000>james</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;created&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// we can query the uncommitted records in the current transaction
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;current transaction assert&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertices</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasNext</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>==</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edges</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasNext</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>==</span> <span style=color:#204a87;font-weight:700>true</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>latchUncommit</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>countDown</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>try</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>latchRollback</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>await</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span> <span style=color:#204a87;font-weight:700>catch</span> <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>InterruptedException</span> <span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>throw</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>RuntimeException</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;current transaction rollback&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>tx</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>rollback</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>});</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>thread</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>start</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// query none result in other transaction when not commit()
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>latchUncommit</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>await</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;other transaction assert for uncommitted&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#ce5c00;font-weight:700>!</span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertices</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasNext</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#ce5c00;font-weight:700>!</span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edges</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasNext</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#000>latchRollback</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>countDown</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>thread</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>join</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// query none result in other transaction after rollback()
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;other transaction assert for rollback&#34;</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#ce5c00;font-weight:700>!</span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertices</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasNext</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#ce5c00;font-weight:700>!</span><span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edges</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasNext</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=principle-of-transaction-realization>Principle of transaction realization</h5><ul><li>The server internally realizes isolation by binding transactions to threads (ThreadLocal)</li><li>The uncommitted content of this transaction overwrites the old data in chronological order for this transaction to query the latest version of data</li><li>The bottom layer relies on the back-end database to ensure transaction atomicity (for example, the batch interface of Cassandra/RocksDB guarantees atomicity)</li></ul><h6 id=notice>Notice</h6><blockquote><p>The RESTful API does not expose the transaction interface for the time being</p></blockquote><blockquote><p>TinkerPop API allows open transactions, which are automatically closed when the request is completed (Gremlin Server forces close)</p></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-96a920d19e01666d95eded506d502ab4>6.3 - HugeGraph Plugin mechanism and plug-in extension process</h1><h3 id=background>Background</h3><ol><li>HugeGraph is not only open source and open, but also simple and easy to use. General users can easily add plug-in extension functions without changing the source code.</li><li>HugeGraph supports a variety of built-in storage backends, and also allows users to extend custom backends without changing the existing source code.</li><li>HugeGraph supports full-text search. The full-text search function involves word segmentation in various languages. Currently, there are 8 built-in Chinese word
breakers, and it also allows users to expand custom word breakers without changing the existing source code.</li></ol><h3 id=scalable-dimension>Scalable dimension</h3><p>Currently, the plug-in method provides extensions in the following dimensions:</p><ul><li>backend storage</li><li>serializer</li><li>Custom configuration items</li><li>tokenizer</li></ul><h3 id=plug-in-implementation-mechanism>Plug-in implementation mechanism</h3><ol><li>HugeGraph provides a plug-in interface HugeGraphPlugin, which supports plug-in through the Java SPI mechanism</li><li>HugeGraph provides four extension registration functions: registerOptions(), registerBackend(), registerSerializer(),registerAnalyzer()</li><li>The plug-in implementer implements the corresponding Options, Backend, Serializer or Analyzer interface</li><li>The plug-in implementer implements register()the method of the HugeGraphPlugin interface, registers the specific
implementation class listed in the above point 3 in this method, and packs it into a jar package</li><li>The plug-in user puts the jar package in the HugeGraph Server installation directory plugins, modifies the relevant
configuration items to the plug-in custom value, and restarts to take effect</li></ol><h3 id=plug-in-implementation-process-example>Plug-in implementation process example</h3><h4 id=1-create-a-new-maven-project>1 Create a new maven project</h4><h5 id=11-name-the-project-name-hugegraph-plugin-demo>1.1 Name the project name: hugegraph-plugin-demo</h5><h5 id=12-add-hugegraph-core-jar-package-dependencies>1.2 Add <code>hugegraph-core</code> Jar package dependencies</h5><p>The details of maven pom.xml are as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-xml data-lang=xml><span style=display:flex><span><span style=color:#8f5902;font-style:italic>&lt;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&gt;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&lt;project</span> <span style=color:#c4a000>xmlns=</span><span style=color:#4e9a06>&#34;http://maven.apache.org/POM/4.0.0&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#c4a000>xmlns:xsi=</span><span style=color:#4e9a06>&#34;http://www.w3.org/2001/XMLSchema-instance&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#c4a000>xsi:schemaLocation=</span><span style=color:#4e9a06>&#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&#34;</span><span style=color:#204a87;font-weight:700>&gt;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;modelVersion&gt;</span>4.0.0<span style=color:#204a87;font-weight:700>&lt;/modelVersion&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;groupId&gt;</span>org.apache.hugegraph<span style=color:#204a87;font-weight:700>&lt;/groupId&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;artifactId&gt;</span>hugegraph-plugin-demo<span style=color:#204a87;font-weight:700>&lt;/artifactId&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;version&gt;</span>1.0.0<span style=color:#204a87;font-weight:700>&lt;/version&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;packaging&gt;</span>jar<span style=color:#204a87;font-weight:700>&lt;/packaging&gt;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;name&gt;</span>hugegraph-plugin-demo<span style=color:#204a87;font-weight:700>&lt;/name&gt;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;dependencies&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;dependency&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;groupId&gt;</span>org.apache.hugegraph<span style=color:#204a87;font-weight:700>&lt;/groupId&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;artifactId&gt;</span>hugegraph-core<span style=color:#204a87;font-weight:700>&lt;/artifactId&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;version&gt;</span>${project.version}<span style=color:#204a87;font-weight:700>&lt;/version&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;/dependency&gt;</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;/dependencies&gt;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>&lt;/project&gt;</span>
</span></span></code></pre></div><h4 id=2-realize-extended-functions>2 Realize extended functions</h4><h5 id=21-extending-a-custom-backend>2.1 Extending a custom backend</h5><h6 id=211--implement-the-interface-backendstoreprovider>2.1.1 Implement the interface BackendStoreProvider</h6><ul><li>Realizable interfaces: <code>org.apache.hugegraph.backend.store.BackendStoreProvider</code></li><li>Or inherit an abstract class:<code>org.apache.hugegraph.backend.store.AbstractBackendStoreProvider</code></li></ul><p>Take the RocksDB backend RocksDBStoreProvider as an example:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>RocksDBStoreProvider</span> <span style=color:#204a87;font-weight:700>extends</span> <span style=color:#000>AbstractBackendStoreProvider</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>protected</span> <span style=color:#000>String</span> <span style=color:#000>database</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#204a87;font-weight:700>this</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>graph</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>toLowerCase</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@Override</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>protected</span> <span style=color:#000>BackendStore</span> <span style=color:#000>newSchemaStore</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span> <span style=color:#000>store</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>RocksDBSchemaStore</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#204a87;font-weight:700>this</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>this</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>database</span><span style=color:#ce5c00;font-weight:700>(),</span> <span style=color:#000>store</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@Override</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>protected</span> <span style=color:#000>BackendStore</span> <span style=color:#000>newGraphStore</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span> <span style=color:#000>store</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>RocksDBGraphStore</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#204a87;font-weight:700>this</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#204a87;font-weight:700>this</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>database</span><span style=color:#ce5c00;font-weight:700>(),</span> <span style=color:#000>store</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@Override</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>type</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#4e9a06>&#34;rocksdb&#34;</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@Override</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>version</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#4e9a06>&#34;1.0&#34;</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=212-implement-interface-backendstore>2.1.2 Implement interface BackendStore</h6><p>The BackendStore interface is defined as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>interface</span> <span style=color:#000>BackendStore</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Store name
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>store</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Database name
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>database</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Get the parent provider
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendStoreProvider</span> <span style=color:#000>provider</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Open/close database
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>open</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeConfig</span> <span style=color:#000>config</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>close</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Initialize/clear database
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>init</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>clear</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Add/delete data
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>mutate</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>BackendMutation</span> <span style=color:#000>mutation</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Query data
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>Iterator</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>BackendEntry</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>query</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>Query</span> <span style=color:#000>query</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Transaction
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>beginTx</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>commitTx</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>rollbackTx</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Get metadata by key
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>R</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>R</span> <span style=color:#000>metadata</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeType</span> <span style=color:#000>type</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>String</span> <span style=color:#000>meta</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>Object</span><span style=color:#ce5c00;font-weight:700>[]</span> <span style=color:#000>args</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Backend features
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendFeatures</span> <span style=color:#000>features</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// Generate an id for a specific type
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>Id</span> <span style=color:#000>nextId</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeType</span> <span style=color:#000>type</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=213-extending-custom-serializers>2.1.3 Extending custom serializers</h6><p>The serializer must inherit the abstract class: <code>org.apache.hugegraph.backend.serializer.AbstractSerializer</code>
( <code>implements GraphSerializer, SchemaSerializer</code>) The main interface is defined as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>interface</span> <span style=color:#000>GraphSerializer</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeVertex</span> <span style=color:#000>vertex</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeVertexProperty</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeVertexProperty</span><span style=color:#ce5c00;font-weight:700>&lt;?&gt;</span> <span style=color:#000>prop</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>HugeVertex</span> <span style=color:#000>readVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>entry</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeEdge</span> <span style=color:#000>edge</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeEdgeProperty</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeEdgeProperty</span><span style=color:#ce5c00;font-weight:700>&lt;?&gt;</span> <span style=color:#000>prop</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>HugeEdge</span> <span style=color:#000>readEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>entry</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeIndex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeIndex</span> <span style=color:#000>index</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>HugeIndex</span> <span style=color:#000>readIndex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>ConditionQuery</span> <span style=color:#000>query</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>entry</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeId</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeType</span> <span style=color:#000>type</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>Id</span> <span style=color:#000>id</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>Query</span> <span style=color:#000>writeQuery</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>Query</span> <span style=color:#000>query</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>interface</span> <span style=color:#000>SchemaSerializer</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>VertexLabel</span> <span style=color:#000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>VertexLabel</span> <span style=color:#000>readVertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>entry</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>EdgeLabel</span> <span style=color:#000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>EdgeLabel</span> <span style=color:#000>readEdgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>entry</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writePropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>PropertyKey</span> <span style=color:#000>propertyKey</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>PropertyKey</span> <span style=color:#000>readPropertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>entry</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>writeIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>IndexLabel</span> <span style=color:#000>indexLabel</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>IndexLabel</span> <span style=color:#000>readIndexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>HugeGraph</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>BackendEntry</span> <span style=color:#000>entry</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h6 id=214-extend-custom-configuration-items>2.1.4 Extend custom configuration items</h6><p>When adding a custom backend, it may be necessary to add new configuration items. The implementation process mainly includes:</p><ul><li>Add a configuration item container class and implement the interface <code>org.apache.hugegraph.config.OptionHolder</code></li><li>Provide a singleton method <code>public static OptionHolder instance()</code>, and call the method when the object is initialized <code>OptionHolder.registerOptions()</code></li><li>Add configuration item declaration, single-value configuration item type is <code>ConfigOption</code>, multi-value configuration item type is <code>ConfigListOption</code></li></ul><p>Take the RocksDB configuration item definition as an example:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>RocksDBOptions</span> <span style=color:#204a87;font-weight:700>extends</span> <span style=color:#000>OptionHolder</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>private</span> <span style=color:#000>RocksDBOptions</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>super</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>private</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>volatile</span> <span style=color:#000>RocksDBOptions</span> <span style=color:#000>instance</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>synchronized</span> <span style=color:#000>RocksDBOptions</span> <span style=color:#000>instance</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>if</span> <span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>instance</span> <span style=color:#ce5c00;font-weight:700>==</span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>instance</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>RocksDBOptions</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#000>instance</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>registerOptions</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#000>instance</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>final</span> <span style=color:#000>ConfigOption</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>DATA_PATH</span> <span style=color:#ce5c00;font-weight:700>=</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>ConfigOption</span><span style=color:#ce5c00;font-weight:700>&lt;&gt;(</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;rocksdb.data_path&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;The path for storing data of RocksDB.&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#000>disallowEmpty</span><span style=color:#ce5c00;font-weight:700>(),</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;rocksdb-data&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>final</span> <span style=color:#000>ConfigOption</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>WAL_PATH</span> <span style=color:#ce5c00;font-weight:700>=</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>ConfigOption</span><span style=color:#ce5c00;font-weight:700>&lt;&gt;(</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;rocksdb.wal_path&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;The path for storing WAL of RocksDB.&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#000>disallowEmpty</span><span style=color:#ce5c00;font-weight:700>(),</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;rocksdb-data&#34;</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>final</span> <span style=color:#000>ConfigListOption</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>DATA_DISKS</span> <span style=color:#ce5c00;font-weight:700>=</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>ConfigListOption</span><span style=color:#ce5c00;font-weight:700>&lt;&gt;(</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;rocksdb.data_disks&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>false</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;The optimized disks for storing data of RocksDB. &#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;The format of each element: `STORE/TABLE: /path/to/disk`.&#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;Allowed keys are [graph/vertex, graph/edge_out, graph/edge_in, &#34;</span> <span style=color:#ce5c00;font-weight:700>+</span>
</span></span><span style=display:flex><span> <span style=color:#4e9a06>&#34;graph/secondary_index, graph/range_index]&#34;</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>null</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>class</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#000>ImmutableList</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>of</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>);</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h5 id=22-extend-custom-tokenizer>2.2 Extend custom tokenizer</h5><p>The tokenizer needs to implement the interface <code>org.apache.hugegraph.analyzer.Analyzer</code>, take implementing a SpaceAnalyzer space tokenizer as an example.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>package</span> <span style=color:#000>org.apache.hugegraph.plugin</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.util.Arrays</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.util.HashSet</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.util.Set</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.apache.hugegraph.analyzer.Analyzer</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>SpaceAnalyzer</span> <span style=color:#204a87;font-weight:700>implements</span> <span style=color:#000>Analyzer</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@Override</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>Set</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>segment</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span> <span style=color:#000>text</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>HashSet</span><span style=color:#ce5c00;font-weight:700>&lt;&gt;(</span><span style=color:#000>Arrays</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>asList</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>text</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>split</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34; &#34;</span><span style=color:#ce5c00;font-weight:700>)));</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=3-implement-the-plug-in-interface-and-register-it>3. Implement the plug-in interface and register it</h4><p>The plug-in registration entry is <code>HugeGraphPlugin.register()</code>, the custom plug-in must implement this interface method, and register the extension
items defined above inside it. The interface <code>org.apache.hugegraph.plugin.HugeGraphPlugin</code> is defined as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>interface</span> <span style=color:#000>HugeGraphPlugin</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>name</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>register</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>supportsMinVersion</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>supportsMaxVersion</span><span style=color:#ce5c00;font-weight:700>();</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><p>And HugeGraphPlugin provides 4 static methods for registering extensions:</p><ul><li>registerOptions(String name, String classPath): register configuration items</li><li>registerBackend(String name, String classPath): register backend (BackendStoreProvider)</li><li>registerSerializer(String name, String classPath): register serializer</li><li>registerAnalyzer(String name, String classPath): register tokenizer</li></ul><p>The following is an example of registering the SpaceAnalyzer tokenizer:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>package</span> <span style=color:#000>org.apache.hugegraph.plugin</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>DemoPlugin</span> <span style=color:#204a87;font-weight:700>implements</span> <span style=color:#000>HugeGraphPlugin</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@Override</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>name</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>return</span> <span style=color:#4e9a06>&#34;demo&#34;</span><span style=color:#ce5c00;font-weight:700>;</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@Override</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>register</span><span style=color:#ce5c00;font-weight:700>()</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#000>HugeGraphPlugin</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>registerAnalyzer</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;demo&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>SpaceAnalyzer</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>class</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getName</span><span style=color:#ce5c00;font-weight:700>());</span>
</span></span><span style=display:flex><span> <span style=color:#ce5c00;font-weight:700>}</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>}</span>
</span></span></code></pre></div><h4 id=4-configure-spi-entry>4. Configure SPI entry</h4><ol><li>Make sure the services directory exists: hugegraph-plugin-demo/resources/META-INF/services</li><li>Create a text file in the services directory: org.apache.hugegraph.plugin.HugeGraphPlugin</li><li>The content of the file is as follows: org.apache.hugegraph.plugin.DemoPlugin</li></ol><h4 id=5-make-jar-package>5. Make Jar package</h4><p>Through maven packaging, execute the command in the project directory mvn package, and a Jar package file will be generated in the
target directory. Copy the Jar package to the <code>plugins</code> directory when using it, and restart the service to take effect.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-2c9db416c8d78f898d52c91ec12535d4>6.4 - Backup and Restore</h1><h2 id=description>Description</h2><p>Backup and Restore are functions of backup map and restore map. The data backed up and restored includes metadata (schema) and graph data (vertex and edge).</p><h4 id=backup>Backup</h4><p>Export the metadata and graph data of a graph in the HugeGraph system in JSON format.</p><h4 id=restore>Restore</h4><p>Re-import the data in JSON format exported by Backup to a graph in the HugeGraph system.</p><p>Restore has two modes:</p><ul><li>In Restoring mode, the metadata and graph data exported by Backup are restored to the HugeGraph system intact. It can be used for graph backup and recovery, and the general target graph is a new graph (without metadata and graph data). for example:<ul><li>System upgrade, first back up the map, then upgrade the system, and finally restore the map to the new system</li><li>Graph migration, from a HugeGraph system, use the Backup function to export the graph, and then use the Restore function to import the graph into another HugeGraph system</li></ul></li><li>In the Merging mode, the metadata and graph data exported by Backup are imported into another graph that already has metadata or graph data. During the process, the ID of the metadata may change, and the IDs of vertices and edges will also change accordingly.<ul><li>Can be used to merge graphs</li></ul></li></ul><h2 id=instructions>Instructions</h2><p>You can use <a href=/docs/quickstart/hugegraph-tools>hugegraph-tools</a> to backup and restore graphs.</p><h4 id=backup-1>Backup</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/hugegraph backup -t all -d data
</span></span></code></pre></div><p>This command backs up all the metadata and graph data of the hugegraph graph of http://127.0.0.1 to the data directory.</p><blockquote><p>Backup works fine in all three graph modes</p></blockquote><h4 id=restore-1>Restore</h4><p>Restore has two modes: RESTORING and MERGING. Before backup, you must first set the graph mode according to your needs.</p><h5 id=step-1-view-and-set-graph-mode>Step 1: View and set graph mode</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/hugegraph graph-mode-get
</span></span></code></pre></div><p>This command is used to view the current graph mode, including: NONE, RESTORING, MERGING.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/hugegraph graph-mode-set -m RESTORING
</span></span></code></pre></div><p>This command is used to set the graph mode. Before Restore, it can be set to RESTORING or MERGING mode. In the example, it is set to RESTORING.</p><h5 id=step-2-restore-data>Step 2: Restore data</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/hugegraph restore -t all -d data
</span></span></code></pre></div><p>This command re-imports all metadata and graph data in the data directory to the hugegraph graph at http://127.0.0.1.</p><h5 id=step-3-restoring-graph-mode>Step 3: Restoring Graph Mode</h5><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>bin/hugegraph graph-mode-set -m NONE
</span></span></code></pre></div><p>This command is used to restore the graph mode to NONE.</p><p>So far, a complete graph backup and graph recovery process is over.</p><h4 id=help>help</h4><p>For detailed usage of backup and restore commands, please refer to the <a href=/docs/quickstart/hugegraph-tools>hugegraph-tools documentation</a>.</p><h2 id=api-description-for-backuprestore-usage-and-implementation>API description for Backup/Restore usage and implementation</h2><h4 id=backup-2>Backup</h4><p>Backup uses the corresponding list(GET) API export of metadata and graph data, and no new API is added.</p><h4 id=restore-2>Restore</h4><p>Restore uses the corresponding create(POST) API imports for metadata and graph data, and does not add new APIs.</p><p>There are two different modes for Restore: Restoring and Merging. In addition, there is a regular mode of NONE (default), the differences are as follows:</p><ul><li>In None mode, the writing of metadata and graph data is normal, please refer to the function description. special:<ul><li>ID is not allowed when metadata (schema) is created</li><li>Graph data (vertex) is not allowed to specify an ID when the id strategy is Automatic</li></ul></li><li>Restoring mode, restoring to a new graph, in particular:<ul><li>ID is allowed to be specified when metadata (schema) is created</li><li>Graph data (vertex) allows specifying an ID when the id strategy is Automatic</li></ul></li><li>Merging mode, merging into a graph with existing metadata and graph data, in particular:<ul><li>ID is not allowed when metadata (schema) is created</li><li>Graph data (vertex) allows specifying an ID when the id strategy is Automatic</li></ul></li></ul><p>Normally, the graph mode is None. When you need to restore the graph, you need to temporarily change the graph mode to Restoring mode or
Merging mode as needed, and when the Restore is completed, restore the graph mode to None.</p><p>The implemented RESTful API for setting graph mode is as follows:</p><h5 id=view-the-schema-of-a-graph-this-operation-requires-administrator-privileges>View the schema of a graph. <strong>This operation requires administrator privileges</strong></h5><h6 id=method--url>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>GET http://localhost:8080/graphs/{graph}/mode
</span></span></code></pre></div><h6 id=response-status>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mode&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;NONE&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div><blockquote><p>Legal graph modes include: NONE, RESTORING, MERGING</p></blockquote><h5 id=set-the-mode-of-a-graph-this-operation-requires-administrator-privileges>Set the mode of a graph. &ldquo;&ldquo;This operation requires administrator privileges**</h5><h6 id=method--url-1>Method & Url</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>PUT http://localhost:8080/graphs/{graph}/mode
</span></span></code></pre></div><h6 id=request-body>Request Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>&#34;RESTORING&#34;
</span></span></code></pre></div><blockquote><p>Legal graph modes include: NONE, RESTORING, MERGING</p></blockquote><h6 id=response-status-1>Response Status</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#0000cf;font-weight:700>200</span>
</span></span></code></pre></div><h6 id=response-body-1>Response Body</h6><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span><span style=color:#000;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&#34;mode&#34;</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>&#34;RESTORING&#34;</span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>}</span>
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-3465b699399f48689cdc6b5e59a10d69>6.5 - FAQ</h1><ul><li><p>How to choose the back-end storage? Choose RocksDB or Cassandra or Hbase or Mysql?</p><p>Judge according to your specific needs. Generally, if the stand-alone machine or the data volume is &lt; 10 billion, RocksDB is recommended, and other back-end clusters that use distributed storage are recommended.</p></li><li><p>Prompt when starting the service: <code>xxx (core dumped) xxx</code></p><p>Please check if the JDK version is Java 11, at least Java 8 is required</p></li><li><p>The service is started successfully, but there is a prompt similar to &ldquo;Unable to connect to the backend or the connection is not open&rdquo; when operating the graph</p><p>init-storeBefore starting the service for the first time, you need to use the initialization backend first , and subsequent versions will prompt more clearly and directly.</p></li><li><p>Do all backends need to be executed before use init-store, and can the serialization options be filled in at will?</p><p>Except memorynot required, other backends are required, such as: <code>cassandra</code>, <code>hbaseand</code>, <code>rocksdb</code>, etc. Serialization needs to be one-to-one correspondence and cannot be filled in at will.</p></li><li><p>Execution <code>init-store</code> error: <code>Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/librocksdbjni3226083071221514754.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.10' not found (required by /tmp/librocksdbjni3226083071221514754.so)</code></p><p>RocksDB requires gcc 4.3.0 (GLIBCXX_3.4.10) and above</p></li><li><p>The error <code>NoHostAvailableException</code> occurred while executing <code>init-store.sh</code>.</p><p><code>NoHostAvailableException</code> means that the <code>Cassandra</code> service cannot be connected to. If you are sure that you want to use the Cassandra backend, please install and start this service first. As for the message itself, it may not be clear enough, and we will update the documentation to provide further explanation.</p></li><li><p>The <code>bin</code> directory contains <code>start-hugegraph.sh</code>, <code>start-restserver.sh</code> and <code>start-gremlinserver.sh</code>. These scripts seem to be related to startup. Which one should be used?</p><p>Since version 0.3.3, GremlinServer and RestServer have been merged into HugeGraphServer. To start, use start-hugegraph.sh. The latter two will be removed in future versions.</p></li><li><p>Two graphs are configured, the names are <code>hugegraph</code> and <code>hugegraph1</code>, and the command to start the service is <code>start-hugegraph.sh</code>. Is only the hugegraph graph opened?</p><p><code>start-hugegraph.sh</code> will open all graphs under the graphs of <code>gremlin-server.yaml</code>. The two have no direct relationship in name</p></li><li><p>After the service starts successfully, garbled characters are returned when using <code>curl</code> to query all vertices</p><p>The batch vertices/edges returned by the server are compressed (gzip), and can be redirected to <code>gunzip</code> for decompression (<code>curl http://example | gunzip</code>), or can be sent with the <code>postman</code> of <code>Firefox</code> or the <code>restlet</code> plug-in of Chrome browser. request, the response data will be decompressed automatically.</p></li><li><p>When using the vertex Id to query the vertex through the <code>RESTful API</code>, it returns empty, but the vertex does exist</p><p>Check the type of the vertex ID. If it is a string type, the &ldquo;id&rdquo; part of the API URL needs to be enclosed in double quotes, while for numeric types, it is not necessary to enclose the ID in quotes.</p></li><li><p>Vertex Id has been double quoted as required, but querying the vertex via the RESTful API still returns empty</p><p>Check whether the vertex id contains <code>+</code>, <code>space</code>, <code>/</code>, <code>?</code>, <code>%</code>, <code>&</code>, and <code>=</code> reserved characters of these <code>URLs</code>. If they exist, they need to be encoded. The following table gives the coded values:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>special character | encoded value
</span></span><span style=display:flex><span>------------------| -------------
</span></span><span style=display:flex><span>+ | %2B
</span></span><span style=display:flex><span>space | %20
</span></span><span style=display:flex><span>/ | %2F
</span></span><span style=display:flex><span>? | %3F
</span></span><span style=display:flex><span>% | %25
</span></span><span style=display:flex><span># | %23
</span></span><span style=display:flex><span>&amp; | %26
</span></span><span style=display:flex><span>= | %3D
</span></span></code></pre></div></li><li><p>Timeout when querying vertices or edges of a certain category (<code>query by label</code>)</p><p>Since the amount of data belonging to a certain label may be relatively large, please add a limit limit.</p></li><li><p>It is possible to operate the graph through the <code>RESTful API</code>, but when sending <code>Gremlin</code> statements, an error is reported: <code>Request Failed(500)</code></p><p>It may be that the configuration of <code>GremlinServer</code> is wrong, check whether the <code>host</code> and <code>port</code> of <code>gremlin-server.yaml</code> match the <code>gremlinserver.url</code> of <code>rest-server.properties</code>, if they do not match, modify them, and then Restart the service.</p></li><li><p>When using <code>Loader</code> to import data, a <code>Socket Timeout</code> exception occurs, and then <code>Loader</code> is interrupted</p><p>Continuously importing data will put too much pressure on the <code>Server</code>, which will cause some requests to time out. The pressure on <code>Server</code> can be appropriately relieved by adjusting the parameters of <code>Loader</code> (such as: number of retries, retry interval, error tolerance, etc.), and reduce the frequency of this problem.</p></li><li><p>How to delete all vertices and edges. There is no such interface in the RESTful API. Calling <code>g.V().drop()</code> of <code>gremlin</code> will report an error <code>Vertices in transaction have reached capacity xxx</code></p><p>At present, there is really no good way to delete all the data. If the user deploys the <code>Server</code> and the backend by himself, he can directly clear the database and restart the <code>Server</code>. You can use the paging API or scan API to get all the data first, and then delete them one by one.</p></li><li><p>The database has been cleared and <code>init-store</code> has been executed, but when trying to add a schema, the prompt &ldquo;xxx has existed&rdquo; appeared.</p><p>There is a cache in the <code>HugeGraphServer</code>, and it is necessary to restart the <code>Server</code> when the database is cleared, otherwise the residual cache will be inconsistent.</p></li><li><p>An error is reported during the process of inserting vertices or edges: <code>Id max length is 128, but got xxx {yyy}</code> or <code>Big id max length is 32768, but got xxx</code></p><p>In order to ensure query performance, the current backend storage limits the length of the id column. The vertex id cannot exceed 128 bytes, the edge id cannot exceed 32768 bytes, and the index id cannot exceed 128 bytes.</p></li><li><p>Is there support for nested attributes, and if not, are there any alternatives?</p><p>Nested attributes are currently not supported. Alternative: Nested attributes can be taken out as individual vertices and connected with edges.</p></li><li><p>Can an <code>EdgeLabel</code> connect multiple pairs of <code>VertexLabel</code>, such as &ldquo;investment&rdquo; relationship, which can be &ldquo;individual&rdquo; investing in &ldquo;enterprise&rdquo;, or &ldquo;enterprise&rdquo; investing in &ldquo;enterprise&rdquo;?</p><p>An <code>EdgeLabel</code> does not support connecting multiple pairs of <code>VertexLabels</code>, users need to split the <code>EdgeLabel</code> into finer details, such as: &ldquo;personal investment&rdquo;, &ldquo;enterprise investment&rdquo;.</p></li><li><p>Prompt <code>HTTP 415 Unsupported Media Type</code> when sending a request through <code>RestAPI</code></p><p><code>Content-Type: application/json</code> needs to be specified in the request header</p></li></ul><p>Other issues can be searched in the issue area of the corresponding project, such as <a href=https://github.com/apache/hugegraph/issues>Server-Issues</a> / <a href=https://github.com/apache/hugegraph-loader/issues>Loader Issues</a></p></div><div class=td-content style=page-break-before:always><h1 id=pg-d54c862d45861ca39a945d90325e3909>6.6 - Security Report</h1><h2 id=reporting-new-security-problems-with-apache-hugegraph>Reporting New Security Problems with Apache HugeGraph</h2><p>Adhering to the specifications of ASF, the HugeGraph community maintains a highly proactive and open attitude towards addressing security issues in the <strong>remediation</strong> projects.</p><p>We strongly recommend that users first report such issues to our dedicated security email list, with detailed procedures specified in the <a href=https://www.apache.org/security/committers.html>ASF SEC</a> code of conduct.</p><p>Please note that the security email group is reserved for reporting <strong>undisclosed</strong> security vulnerabilities and following up on the vulnerability resolution process.
Regular software <code>Bug/Error</code> reports should be directed to <code>Github Issue/Discussion</code> or the <code>HugeGraph-Dev</code> email group. Emails sent to the security list that are unrelated to security issues will be ignored.</p><p>The independent security email (group) address is: <code>security@hugegraph.apache.org</code></p><p>The general process for handling security vulnerabilities is as follows:</p><ul><li>The reporter privately reports the vulnerability to the Apache HugeGraph SEC email group (including as much information as possible, such as reproducible versions, relevant descriptions, reproduction methods, and the scope of impact)</li><li>The HugeGraph project security team collaborates privately with the reporter to discuss the vulnerability resolution (after preliminary confirmation, a <code>CVE</code> number can be requested for registration)</li><li>The project creates a new version of the software package affected by the vulnerability to provide a fix</li><li>At an appropriate time, a general description of the vulnerability and how to apply the fix will be publicly disclosed (in compliance with ASF standards, the announcement should not disclose sensitive information such as reproduction details)</li><li>Official CVE release and related procedures follow the ASF-SEC page</li></ul><h2 id=known-security-vulnerabilities-cves>Known Security Vulnerabilities (CVEs)</h2><h3 id=hugegraph-main-project-serverpdstore>HugeGraph main project (Server/PD/Store)</h3><ul><li><a href="https://www.cve.org/CVERecord?id=CVE-2024-27348">CVE-2024-27348</a>: HugeGraph-Server - Command execution in gremlin</li><li><a href="https://www.cve.org/CVERecord?id=CVE-2024-27349">CVE-2024-27349</a>: HugeGraph-Server - Bypass whitelist in Auth mode</li></ul><h3 id=hugegraph-toolchain-project-hubbleloaderclienttools>HugeGraph-Toolchain project (Hubble/Loader/Client/Tools/..)</h3><ul><li><a href="https://www.cve.org/CVERecord?id=CVE-2024-27347">CVE-2024-27347</a>: HugeGraph-Hubble - SSRF in Hubble connection page</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-3ed7a32fc6a58bb9d03dcd00dc874ba8>7 - QUERY LANGUAGE</h1></div><div class=td-content><h1 id=pg-2696905b5b6cbdf2ad7f78085bd6baa9>7.1 - HugeGraph Gremlin</h1><h3 id=overview>Overview</h3><p>HugeGraph supports <a href=https://tinkerpop.apache.org/gremlin.html>Gremlin</a>, a graph traversal query language of <a href=https://tinkerpop.apache.org>Apache TinkerPop3</a>. While SQL is a query language for relational databases, Gremlin is a general-purpose query language for graph databases. Gremlin can be used to create entities (Vertex and Edge) of a graph, modify the properties of entities, delete entities, as well as perform graph queries.</p><p>Gremlin can be used to create entities (Vertex and Edge) of a graph, modify the properties of entities, and delete entities. More importantly, it can be used to perform graph querying and analysis operations.</p><h3 id=tinkerpop-features>TinkerPop Features</h3><p>HugeGraph implements the TinkerPop framework, but not all TinkerPop features are implemented.</p><p>The table below lists the support status of various TinkerPop features in HugeGraph:</p><h3 id=graph-features>Graph Features</h3><table><thead><tr><th>Name</th><th>Description</th><th>Support</th></tr></thead><tbody><tr><td>Computer</td><td>Determines if the {@code Graph} implementation supports {@link GraphComputer} based processing</td><td>false</td></tr><tr><td>Transactions</td><td>Determines if the {@code Graph} implementations supports transactions.</td><td>true</td></tr><tr><td>Persistence</td><td>Determines if the {@code Graph} implementation supports persisting it&rsquo;s contents natively to disk.This feature does not refer to every graph&rsquo;s ability to write to disk via the Gremlin IO packages(.e.g. GraphML), unless the graph natively persists to disk via those options somehow. For example,TinkerGraph does not support this feature as it is a pure in-sideEffects graph.</td><td>true</td></tr><tr><td>ThreadedTransactions</td><td>Determines if the {@code Graph} implementation supports threaded transactions which allow a transaction be executed across multiple threads via {@link Transaction#createThreadedTx()}.</td><td>false</td></tr><tr><td>ConcurrentAccess</td><td>Determines if the {@code Graph} implementation supports more than one connection to the same instance at the same time. For example, Neo4j embedded does not support this feature because concurrent access to the same database files by multiple instances is not possible. However, Neo4j HA could support this feature as each new {@code Graph} instance coordinates with the Neo4j cluster allowing multiple instances to operate on the same database.</td><td>false</td></tr></tbody></table><h3 id=vertex-features>Vertex Features</h3><table><thead><tr><th>Name</th><th>Description</th><th>Support</th></tr></thead><tbody><tr><td>UserSuppliedIds</td><td>Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept.</td><td>false</td></tr><tr><td>NumericIds</td><td>Determines if an {@link Element} has numeric identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a numeric value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>StringIds</td><td>Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>UuidIds</td><td>Determines if an {@link Element} has UUID identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a {@link UUID} value then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>CustomIds</td><td>Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB&rsquo;s {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>AnyIds</td><td>Determines if an {@link Element} any Java object is a suitable identifier. TinkerGraph is a good example of a {@link Graph} that can support this feature, as it can use any {@link Object} as a value for the identifier. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. This setting should only return {@code true} if {@link #supportsUserSuppliedIds()} is {@code true}.</td><td>false</td></tr><tr><td>AddProperty</td><td>Determines if an {@link Element} allows properties to be added. This feature is set independently from supporting &ldquo;data types&rdquo; and refers to support of calls to {@link Element#property(String, Object)}.</td><td>true</td></tr><tr><td>RemoveProperty</td><td>Determines if an {@link Element} allows properties to be removed.</td><td>true</td></tr><tr><td>AddVertices</td><td>Determines if a {@link Vertex} can be added to the {@code Graph}.</td><td>true</td></tr><tr><td>MultiProperties</td><td>Determines if a {@link Vertex} can support multiple properties with the same key.</td><td>false</td></tr><tr><td>DuplicateMultiProperties</td><td>Determines if a {@link Vertex} can support non-unique values on the same key. For this value to be {@code true}, then {@link #supportsMetaProperties()} must also return true. By default this method, just returns what {@link #supportsMultiProperties()} returns.</td><td>false</td></tr><tr><td>MetaProperties</td><td>Determines if a {@link Vertex} can support properties on vertex properties. It is assumed that a graph will support all the same data types for meta-properties that are supported for regular properties.</td><td>false</td></tr><tr><td>RemoveVertices</td><td>Determines if a {@link Vertex} can be removed from the {@code Graph}.</td><td>true</td></tr></tbody></table><h3 id=edge-features>Edge Features</h3><table><thead><tr><th>Name</th><th>Description</th><th>Support</th></tr></thead><tbody><tr><td>UserSuppliedIds</td><td>Determines if an {@link Element} can have a user defined identifier. Implementation that do not support this feature will be expected to auto-generate unique identifiers. In other words, if the {@link Graph} allows {@code graph.addVertex(id,x)} to work and thus set the identifier of the newly added {@link Vertex} to the value of {@code x} then this feature should return true. In this case, {@code x} is assumed to be an identifier data type that the {@link Graph} will accept.</td><td>false</td></tr><tr><td>NumericIds</td><td>Determines if an {@link Element} has numeric identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a numeric value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>StringIds</td><td>Determines if an {@link Element} has string identifiers as their internal representation. In other words, if the value returned from {@link Element#id()} is a string value then this method should be return {@code true}. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>UuidIds</td><td>Determines if an {@link Element} has UUID identifiers as their internal representation. In other words,if the value returned from {@link Element#id()} is a {@link UUID} value then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>CustomIds</td><td>Determines if an {@link Element} has a specific custom object as their internal representation.In other words, if the value returned from {@link Element#id()} is a type defined by the graph implementations, such as OrientDB&rsquo;s {@code Rid}, then this method should be return {@code true}.Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.</td><td>false</td></tr><tr><td>AnyIds</td><td>Determines if an {@link Element} any Java object is a suitable identifier. TinkerGraph is a good example of a {@link Graph} that can support this feature, as it can use any {@link Object} as a value for the identifier. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. This setting should only return {@code true} if {@link #supportsUserSuppliedIds()} is {@code true}.</td><td>false</td></tr><tr><td>AddProperty</td><td>Determines if an {@link Element} allows properties to be added. This feature is set independently from supporting &ldquo;data types&rdquo; and refers to support of calls to {@link Element#property(String, Object)}.</td><td>true</td></tr><tr><td>RemoveProperty</td><td>Determines if an {@link Element} allows properties to be removed.</td><td>true</td></tr><tr><td>AddEdges</td><td>Determines if an {@link Edge} can be added to a {@code Vertex}.</td><td>true</td></tr><tr><td>RemoveEdges</td><td>Determines if an {@link Edge} can be removed from a {@code Vertex}.</td><td>true</td></tr></tbody></table><h3 id=data-type-features>Data Type Features</h3><table><thead><tr><th>Name</th><th>Description</th><th>Support</th></tr></thead><tbody><tr><td>BooleanValues</td><td></td><td>true</td></tr><tr><td>ByteValues</td><td></td><td>true</td></tr><tr><td>DoubleValues</td><td></td><td>true</td></tr><tr><td>FloatValues</td><td></td><td>true</td></tr><tr><td>IntegerValues</td><td></td><td>true</td></tr><tr><td>LongValues</td><td></td><td>true</td></tr><tr><td>MapValues</td><td>Supports setting of a {@code Map} value. The assumption is that the {@code Map} can contain arbitrary serializable values that may or may not be defined as a feature itself</td><td>false</td></tr><tr><td>MixedListValues</td><td>Supports setting of a {@code List} value. The assumption is that the {@code List} can contain arbitrary serializable values that may or may not be defined as a feature itself. As this{@code List} is &ldquo;mixed&rdquo; it does not need to contain objects of the same type.</td><td>false</td></tr><tr><td>BooleanArrayValues</td><td></td><td>false</td></tr><tr><td>ByteArrayValues</td><td></td><td>true</td></tr><tr><td>DoubleArrayValues</td><td></td><td>false</td></tr><tr><td>FloatArrayValues</td><td></td><td>false</td></tr><tr><td>IntegerArrayValues</td><td></td><td>false</td></tr><tr><td>LongArrayValues</td><td></td><td>false</td></tr><tr><td>SerializableValues</td><td></td><td>false</td></tr><tr><td>StringArrayValues</td><td></td><td>false</td></tr><tr><td>StringValues</td><td></td><td>true</td></tr><tr><td>UniformListValues</td><td>Supports setting of a {@code List} value. The assumption is that the {@code List} can contain arbitrary serializable values that may or may not be defined as a feature itself. As this{@code List} is &ldquo;uniform&rdquo; it must contain objects of the same type.</td><td>false</td></tr></tbody></table><h3 id=gremlin-steps>Gremlin Steps</h3><p>HugeGraph supports all steps of Gremlin. For complete reference information about Gremlin, please refer to the <a href=http://tinkerpop.apache.org/docs/current/reference/>Gremlin official website</a>.</p><table><thead><tr><th>Step</th><th>Description</th><th>Documentation</th></tr></thead><tbody><tr><td>addE</td><td>Add an edge between two vertices.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#addedge-step>addE step</a></td></tr><tr><td>addV</td><td>add vertices to graph.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#addvertex-step>addV step</a></td></tr><tr><td>and</td><td>Make sure all traversals return values.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#add-step>and step</a></td></tr><tr><td>as</td><td>Step modulator for assigning variables to the step&rsquo;s output.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#as-step>as step</a></td></tr><tr><td>by</td><td>Step Modulators used in conjunction with group and order.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#by-step>by step</a></td></tr><tr><td>coalesce</td><td>Returns the first traversal that returns a result.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#coalesce-step>coalesce step</a></td></tr><tr><td>constant</td><td>Returns a constant value. Used in conjunction with coalesce.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#constant-step>constant step</a></td></tr><tr><td>count</td><td>Returns a count from the traversal.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#addedge-step>count step</a></td></tr><tr><td>dedup</td><td>Returns values with duplicates removed.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#dedup-step>dedup step</a></td></tr><tr><td>drop</td><td>Discards a value (vertex/edge).</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#drop-step>drop step</a></td></tr><tr><td>fold</td><td>Acts as a barrier for computing aggregated values from results.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#fold-step>fold step</a></td></tr><tr><td>group</td><td>Groups values based on specified labels.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#group-step>group step</a></td></tr><tr><td>has</td><td>Used to filter properties, vertices, and edges. Supports <code>hasLabel</code>, <code>hasId</code>, <code>hasNot</code>, and <code>has</code> variants.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#has-step>has step</a></td></tr><tr><td>inject</td><td>Injects values into the stream.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#inject-step>inject step</a></td></tr><tr><td>is</td><td>Used to filter by a Boolean expression.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#is-step>is step</a></td></tr><tr><td>limit</td><td>Used to limit the number of items in a traversal.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#limit-step>limit step</a></td></tr><tr><td>local</td><td>Locally wraps a part of a traversal, similar to a subquery.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#local-step>local step</a></td></tr><tr><td>not</td><td>Used to generate the negation result of a filter.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#not-step>not step</a></td></tr><tr><td>optional</td><td>Returns the result of a specified traversal if it generates any results, otherwise returns the calling element.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#optional-step>optional step</a></td></tr><tr><td>or</td><td>Ensures that at least one traversal returns a value.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#or-step>or step</a></td></tr><tr><td>order</td><td>Returns results in the specified order.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#order-step>order step</a></td></tr><tr><td>path</td><td>Returns the full path of the traversal.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#addedge-step>path step</a></td></tr><tr><td>project</td><td>Projects properties as a map.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#project-step>project step</a></td></tr><tr><td>properties</td><td>Returns properties with specified labels.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#properties-step>properties step</a></td></tr><tr><td>range</td><td>Filters based on a specified range of values.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#range-step>range step</a></td></tr><tr><td>repeat</td><td>Repeats a step a specified number of times. Used for looping.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#repeat-step>repeat step</a></td></tr><tr><td>sample</td><td>Used to sample results returned by the traversal.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#sample-step>sample step</a></td></tr><tr><td>select</td><td>Used to project the results returned by the traversal.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#select-step>select step</a></td></tr><tr><td>store</td><td>This step is used fo.r non-blocking aggregation of results returned by traversal</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#store-step>store step</a></td></tr><tr><td>tree</td><td>Aggregate the paths in vertices into a tree.</td><td><a href=http://tinkerpop.apac.he.org/docs/current/reference/#tree-step>tree step</a></td></tr><tr><td>unfold</td><td>Unfolds an iterator as a step.</td><td><a href=http://tinkerpop.apache.org/docs/c.urrent/reference/#unfold-step>unfold step</a></td></tr><tr><td>union</td><td>Merge the results returned by multiple traversals.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#union-step>union step</a></td></tr><tr><td>V</td><td>These are the steps required for traversing between vertices and edges: <code>V</code>, <code>E</code>, <code>out</code>, <code>in</code>, <code>both</code>, <code>outE</code>, <code>inE</code>, <code>bothE</code>, <code>outV</code>, <code>inV</code>, <code>bothV</code>, and <code>otherV</code>.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#vertex-steps>order step</a></td></tr><tr><td>where</td><td>Used to filter the results returned by a traversal. Supports <code>eq</code>, <code>neq</code>, <code>lt</code>, <code>lte</code>, <code>gt</code>, <code>gte</code>, and <code>between</code> operators.</td><td><a href=http://tinkerpop.apache.org/docs/current/reference/#where-step>where step</a></td></tr></tbody></table></div><div class=td-content style=page-break-before:always><h1 id=pg-29164f631ea2ad7e883c0ba00a843508>7.2 - HugeGraph Examples</h1><h3 id=1-概述>1 概述</h3><p>本示例将<a href=http://s3.thinkaurelius.com/docs/titan/1.0.0/getting-started.html>TitanDB Getting Started</a> 为模板来演示HugeGraph的使用方法。通过对比HugeGraph和TitanDB,了解HugeGraph和TitanDB的差异。</p><h4 id=11-hugegraph与titandb的异同>1.1 HugeGraph与TitanDB的异同</h4><p>HugeGraph和TitanDB都是基于<a href=https://tinkerpop.apache.org>Apache TinkerPop3</a>框架的图数据库,均支持<a href=https://tinkerpop.apache.org/gremlin.html>Gremlin</a>图查询语言,在使用方法和接口方面具有很多相似的地方。然而HugeGraph是全新设计开发的,其代码结构清晰,功能较为丰富,接口更为友好等特点。</p><p>HugeGraph相对于TitanDB而言,其主要特点如下:</p><ul><li>HugeGraph目前有HugeGraph-API、HugeGraph-Client、HugeGraph-Loader、HugeGraph-Studio、HugeGraph-Spark等完善的工具组件,可以完成系统集成、数据载入、图可视化查询、Spark 连接等功能;</li><li>HugeGraph具有Server和Client的概念,第三方系统可以通过jar引用、client、api等多种方式接入,而TitanDB仅支持jar引用方式接入。</li><li>HugeGraph的Schema需要显式定义,所有的插入和查询均需要通过严格的schema校验,目前暂不支持schema的隐式创建。</li><li>HugeGraph充分利用后端存储系统的特点来实现数据高效存取,而TitanDB以统一的Kv结构无视后端的差异性。</li><li>HugeGraph的更新操作可以实现按需操作(例如:更新某个属性)性能更好。TitanDB的更新是read and update方式。</li><li>HugeGraph的VertexId和EdgeId均支持拼接,可实现自动去重,同时查询性能更好。TitanDB的所有Id均是自动生成,查询需要经索引。</li></ul><h4 id=12-人物关系图谱>1.2 人物关系图谱</h4><p>本示例通过Property Graph Model图数据模型来描述希腊神话中各人物角色的关系(也被成为人物关系图谱),具体关系详见下图。</p><div style=text-align:center><img src=/docs/images/graph-of-gods.png alt=image></div><p>其中,圆形节点代表实体(Vertex),箭头代表关系(Edge),方框的内容为属性。</p><p>该关系图谱中有两类顶点,分别是人物(character)和位置(location)如下表:</p><table><thead><tr><th>名称</th><th>类型</th><th>属性</th></tr></thead><tbody><tr><td>character</td><td>vertex</td><td>name,age,type</td></tr><tr><td>location</td><td>vertex</td><td>name</td></tr></tbody></table><p>有六种关系,分别是父子(father)、母子(mother)、兄弟(brother)、战斗(battled)、居住(lives)、拥有宠物(pet) 关于关系图谱的具体信息如下:</p><table><thead><tr><th>名称</th><th>类型</th><th>source vertex label</th><th>target vertex label</th><th>属性</th></tr></thead><tbody><tr><td>father</td><td>edge</td><td>character</td><td>character</td><td>-</td></tr><tr><td>mother</td><td>edge</td><td>character</td><td>character</td><td>-</td></tr><tr><td>brother</td><td>edge</td><td>character</td><td>character</td><td>-</td></tr><tr><td>pet</td><td>edge</td><td>character</td><td>character</td><td>-</td></tr><tr><td>lives</td><td>edge</td><td>character</td><td>location</td><td>reason</td></tr></tbody></table><p>在HugeGraph中,每个edge label只能作用于一对source vertex label和target vertex label。也就是说,如果一个图内定义了一种关系father连接character和character,那farther就不能再连接其他的vertex labels。</p><p>因此本例子将原TitanDB中的monster, god, human, demigod均使用相同的<code>vertex label: character</code>来表示, 同时增加属性type来标识人物的类型。<code>edge label</code>与原TitanDB保持一致。当然为了满足<code>edge label</code>约束,也可以通过调整<code>edge label</code><code>name</code>来实现。</p><h3 id=2-graph-schema-and-data-ingest-examples>2 Graph Schema and Data Ingest Examples</h3><p>HugeGraph需要显示创建Schema,因此需要依次创建PropertyKey、VertexLabel、EdgeLabel,如果有需要索引还需要创建IndexLabel。</p><h4 id=21-graph-schema>2.1 Graph Schema</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>schema</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>hugegraph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>schema</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;time&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asInt</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;reason&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>propertyKey</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>asText</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>vertexLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;location&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>primaryKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;father&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;mother&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;battled&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;time&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lives&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;location&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>properties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;reason&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>nullableKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;reason&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;pet&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#000>schema</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>edgeLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;brother&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>link</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>ifNotExist</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>create</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span></code></pre></div><h4 id=22-graph-data>2.2 Graph Data</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// add vertices
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>Vertex</span> <span style=color:#000>saturn</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;saturn&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;titan&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>sky</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;location&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;sky&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>sea</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;location&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;sea&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>jupiter</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;jupiter&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>5000</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;god&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>neptune</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;neptune&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>4500</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;god&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>hercules</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;hercules&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>30</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;demigod&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>alcmene</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;alcmene&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>45</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;human&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>pluto</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;pluto&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;age&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>4000</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;god&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>nemean</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;nemean&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;monster&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>hydra</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;hydra&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;monster&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>cerberus</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;character&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;cerberus&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;type&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;monster&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>Vertex</span> <span style=color:#000>tartarus</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addVertex</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>T</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>label</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;location&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;name&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;tartarus&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// add edges
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>jupiter</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;father&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>saturn</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>jupiter</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lives&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>sky</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;reason&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;loves fresh breezes&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>jupiter</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;brother&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>neptune</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>jupiter</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;brother&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>neptune</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lives&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>sea</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;reason&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;loves waves&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>neptune</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;brother&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>jupiter</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>neptune</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;brother&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>hercules</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;father&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>jupiter</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>hercules</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;mother&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>alcmene</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>hercules</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;battled&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>nemean</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;time&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>1</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>hercules</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;battled&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>hydra</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;time&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>hercules</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;battled&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>cerberus</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;time&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>12</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;brother&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>jupiter</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;brother&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>neptune</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lives&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>tartarus</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;reason&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#34;no fear of death&#34;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;pet&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>cerberus</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>cerberus</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>addEdge</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;lives&#34;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>tartarus</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><h4 id=23-indices>2.3 Indices</h4><p>HugeGraph默认是自动生成Id,如果用户通过<code>primaryKeys</code>指定<code>VertexLabel</code><code>primaryKeys</code>字段列表后,<code>VertexLabel</code>的Id策略将会自动切换到<code>primaryKeys</code>策略。 启用<code>primaryKeys</code>策略后,HugeGraph通过<code>vertexLabel+primaryKeys</code>拼接生成<code>VertexId</code> ,可实现自动去重,同时无需额外创建索引即可以使用<code>primaryKeys</code>中的属性进行快速查询。 例如 &ldquo;character&rdquo; 和 &ldquo;location&rdquo; 都有<code>primaryKeys("name")</code>属性,因此在不额外创建索引的情况下可以通过<code>g.V().hasLabel('character') .has('name','hercules')</code>查询vertex 。</p><h3 id=3-graph-traversal-examples>3 Graph Traversal Examples</h3><h4 id=31-traversal-query>3.1 Traversal Query</h4><p><strong>1. Find the grandfather of hercules</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#39;hercules&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;father&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;father&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><p>也可以通过<code>repeat</code>方式:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#39;hercules&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>repeat</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>__</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;father&#39;</span><span style=color:#ce5c00;font-weight:700>)).</span><span style=color:#c4a000>times</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>2</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><p><strong>2. Find the name of hercules&rsquo;s father</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#39;hercules&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;father&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>value</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><p><strong>3. Find the characters with age > 100</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;age&#39;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#000>gt</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>100</span><span style=color:#ce5c00;font-weight:700>))</span>
</span></span></code></pre></div><p><strong>4. Find who are pluto&rsquo;s cohabitants</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#39;pluto&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>in</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>values</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><p><strong>5. Find pluto can&rsquo;t be his own cohabitant</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>pluto</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#39;pluto&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>in</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>where</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>is</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>neq</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>)).</span><span style=color:#c4a000>values</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// use &#39;as&#39;
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#39;pluto&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>as</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;x&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>in</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>where</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>neq</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;x&#39;</span><span style=color:#ce5c00;font-weight:700>)).</span><span style=color:#c4a000>values</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><p><strong>6. Pluto&rsquo;s Brothers</strong></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-groovy data-lang=groovy><span style=display:flex><span><span style=color:#000>pluto</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>().</span><span style=color:#c4a000>hasLabel</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;character&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>has</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#4e9a06>&#39;pluto&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>next</span><span style=color:#ce5c00;font-weight:700>()</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// where do pluto&#39;s brothers live?
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;brother&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>values</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// which brother lives in which place?
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;brother&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>as</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;god&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>as</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;place&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>select</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;god&#39;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#39;place&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>// what is the name of the brother and the name of the place?
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span><span style=color:#000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>V</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>pluto</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;brother&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>as</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;god&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;lives&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>as</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;place&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>select</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;god&#39;</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#4e9a06>&#39;place&#39;</span><span style=color:#ce5c00;font-weight:700>).</span><span style=color:#c4a000>by</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#39;name&#39;</span><span style=color:#ce5c00;font-weight:700>)</span>
</span></span></code></pre></div><p>推荐使用<a href=/docs/quickstart/hugegraph-studio>HugeGraph-Studio</a> 通过可视化的方式来执行上述代码。另外也可以通过HugeGraph-Client、HugeApi、GremlinConsole和GremlinDriver等多种方式执行上述代码。</p><h4 id=32-总结>3.2 总结</h4><p>HugeGraph 目前支持 <code>Gremlin</code> 的语法,用户可以通过 <code>Gremlin / REST-API</code> 实现各种查询需求。</p></div><div class=td-content style=page-break-before:always><h1 id=pg-f0a22a813c843322c0d360d952e434ce>8 - PERFORMANCE</h1></div><div class=td-content><h1 id=pg-63f6d63db3ee3a5270fc1ca0a0c0e181>8.1 - HugeGraph BenchMark Performance</h1><blockquote><p><strong>Note:</strong></p><p>The current performance metrics are based on an earlier version. The <strong>latest version</strong> has significant
improvements in both performance and functionality. We encourage you to refer to the most recent release featuring
<strong>autonomous distributed storage</strong> and <strong>enhanced computational push down capabilities</strong>. Alternatively,
you may wait for the community to update the data with these enhancements.</p></blockquote><h3 id=1-test-environment>1 Test environment</h3><h4 id=11-hardware-information>1.1 Hardware information</h4><table><thead><tr><th>CPU</th><th>Memory</th><th>网卡</th><th>磁盘</th></tr></thead><tbody><tr><td>48 Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz</td><td>128G</td><td>10000Mbps</td><td>750GB SSD</td></tr></tbody></table><h4 id=12-software-information>1.2 Software information</h4><h5 id=121-test-cases>1.2.1 Test cases</h5><p>Testing is done using the <a href=https://github.com/socialsensor/graphdb-benchmarks>graphdb-benchmark</a>, a benchmark suite for graph databases. This benchmark suite mainly consists of four types of tests:</p><ul><li>Massive Insertion, which involves batch insertion of vertices and edges, with a certain number of vertices or edges being submitted at once.</li><li>Single Insertion, which involves the immediate insertion of each vertex or edge, one at a time.</li><li>Query, which mainly includes the basic query operations of the graph database:<ul><li>Find Neighbors, which queries the neighbors of all vertices.</li><li>Find Adjacent Nodes, which queries the adjacent vertices of all edges.</li><li>Find the Shortest Path, which queries the shortest path from the first vertex to 100 random vertices.</li></ul></li><li>Clustering, which is a community detection algorithm based on the Louvain Method.</li></ul><h5 id=122-test-dataset>1.2.2 Test dataset</h5><p>Tests are conducted using both synthetic and real data.</p><ul><li><p>MIW, SIW, and QW use SNAP datasets:</p><ul><li><a href=http://snap.stanford.edu/data/email-Enron.html>Enron Dataset</a></li><li><a href=http://snap.stanford.edu/data/amazon0601.html>Amazon dataset</a></li><li><a href=http://snap.stanford.edu/data/com-Youtube.html>Youtube dataset</a></li><li><a href=http://snap.stanford.edu/data/com-LiveJournal.html>LiveJournal dataset</a></li></ul></li><li><p>CW uses synthetic data generated by the <a href=https://sites.google.com/site/andrealancichinetti/files>LFR-Benchmark generator</a>.</p></li></ul><p>The size of the datasets used in this test is not mentioned.</p><table><thead><tr><th>Name</th><th>Number of Vertices</th><th>Number of Edges</th><th>File Size</th></tr></thead><tbody><tr><td>email-enron.txt</td><td>36,691</td><td>367,661</td><td>4MB</td></tr><tr><td>com-youtube.ungraph.txt</td><td>1,157,806</td><td>2,987,624</td><td>38.7MB</td></tr><tr><td>amazon0601.txt</td><td>403,393</td><td>3,387,388</td><td>47.9MB</td></tr><tr><td>com-lj.ungraph.txt</td><td>3997961</td><td>34681189</td><td>479MB</td></tr></tbody></table><h4 id=13-service-configuration>1.3 Service configuration</h4><ul><li><p>HugeGraph version: 0.5.6, RestServer and Gremlin Server and backends are on the same server</p><ul><li>RocksDB version: rocksdbjni-5.8.6</li></ul></li><li><p>Titan version: 0.5.4, using thrift+Cassandra mode</p><ul><li>Cassandra version: cassandra-3.10, commit-log and data use SSD together</li></ul></li><li><p>Neo4j version: 2.0.1</p></li></ul><blockquote><p>The Titan version adapted by graphdb-benchmark is 0.5.4.</p></blockquote><h3 id=2-test-results>2 Test results</h3><h4 id=21-batch-insertion-performance>2.1 Batch insertion performance</h4><table><thead><tr><th>Backend</th><th>email-enron(30w)</th><th>amazon0601(300w)</th><th>com-youtube.ungraph(300w)</th><th>com-lj.ungraph(3000w)</th></tr></thead><tbody><tr><td>HugeGraph</td><td>0.629</td><td>5.711</td><td>5.243</td><td>67.033</td></tr><tr><td>Titan</td><td>10.15</td><td>108.569</td><td>150.266</td><td>1217.944</td></tr><tr><td>Neo4j</td><td>3.884</td><td>18.938</td><td>24.890</td><td>281.537</td></tr></tbody></table><p><em>Instructions</em></p><ul><li>The data scale is in the table header in terms of edges</li><li>The data in the table is the time for batch insertion, in seconds</li><li>For example, HugeGraph(RocksDB) spent 5.711 seconds to insert 3 million edges of the amazon0601 dataset.</li></ul><h5 id=conclusion>Conclusion</h5><ul><li>The performance of batch insertion: HugeGraph(RocksDB) > Neo4j > Titan(thrift+Cassandra)</li></ul><h4 id=22-traversal-performance>2.2 Traversal performance</h4><h5 id=221-explanation-of-terms>2.2.1 Explanation of terms</h5><ul><li>FN(Find Neighbor): Traverse all vertices, find the adjacent edges based on each vertex, and use the edges and vertices to find the other vertices adjacent to the original vertex.</li><li>FA(Find Adjacent): Traverse all edges, get the source vertex and target vertex based on each edge.</li></ul><h5 id=222-fn-performance>2.2.2 FN performance</h5><table><thead><tr><th>Backend</th><th>email-enron(3.6w)</th><th>amazon0601(40w)</th><th>com-youtube.ungraph(120w)</th><th>com-lj.ungraph(400w)</th></tr></thead><tbody><tr><td>HugeGraph</td><td>4.072</td><td>45.118</td><td>66.006</td><td>609.083</td></tr><tr><td>Titan</td><td>8.084</td><td>92.507</td><td>184.543</td><td>1099.371</td></tr><tr><td>Neo4j</td><td>2.424</td><td>10.537</td><td>11.609</td><td>106.919</td></tr></tbody></table><p><em>Instructions</em></p><ul><li>The data in the table header &ldquo;()&rdquo; represents the data scale, in terms of vertices.</li><li>The data in the table represents the time spent traversing vertices in seconds.</li><li>For example, HugeGraph uses the RocksDB backend to traverse all vertices in amazon0601, and search for adjacent edges and another vertex, which takes a total of 45.118 seconds.</li></ul><h5 id=223-fa-performance>2.2.3 FA performance</h5><table><thead><tr><th>Backend</th><th>email-enron(30w)</th><th>amazon0601(300w)</th><th>com-youtube.ungraph(300w)</th><th>com-lj.ungraph(3000w)</th></tr></thead><tbody><tr><td>HugeGraph</td><td>1.540</td><td>10.764</td><td>11.243</td><td>151.271</td></tr><tr><td>Titan</td><td>7.361</td><td>93.344</td><td>169.218</td><td>1085.235</td></tr><tr><td>Neo4j</td><td>1.673</td><td>4.775</td><td>4.284</td><td>40.507</td></tr></tbody></table><p><em>Explanation</em></p><ul><li>The data size in the header &ldquo;()&rdquo; is based on the number of vertices.</li><li>The data in the table is the time it takes to traverse the vertices in seconds.</li><li>For example, HugeGraph with RocksDB backend traverses all vertices in the amazon0601 dataset, and it looks up adjacent edges and other vertices, taking a total of 45.118 seconds.</li></ul><h6 id=conclusion-1>Conclusion</h6><ul><li>Traversal performance: Neo4j > HugeGraph(RocksDB) > Titan(thrift+Cassandra)</li></ul><h4 id=23-performance-of-common-graph-analysis-methods-in-hugegraph>2.3 Performance of Common Graph Analysis Methods in HugeGraph</h4><h5 id=terminology-explanation>Terminology Explanation</h5><ul><li>FS (Find Shortest Path): finding the shortest path between two vertices</li><li>K-neighbor: all vertices that can be reached by traversing K hops (including 1, 2, 3&mldr;(K-1) hops) from the starting vertex</li><li>K-out: all vertices that can be reached by traversing exactly K out-edges from the starting vertex.</li></ul><h5 id=fs-performance>FS performance</h5><table><thead><tr><th>Backend</th><th>email-enron(30w)</th><th>amazon0601(300w)</th><th>com-youtube.ungraph(300w)</th><th>com-lj.ungraph(3000w)</th></tr></thead><tbody><tr><td>HugeGraph</td><td>0.494</td><td>0.103</td><td>3.364</td><td>8.155</td></tr><tr><td>Titan</td><td>11.818</td><td>0.239</td><td>377.709</td><td>575.678</td></tr><tr><td>Neo4j</td><td>1.719</td><td>1.800</td><td>1.956</td><td>8.530</td></tr></tbody></table><p><em>Explanation</em></p><ul><li>The data in the header &ldquo;()&rdquo; represents the data scale in terms of edges</li><li>The data in the table is the time it takes to find the shortest path <strong>from the first vertex to 100 randomly selected vertices</strong> in seconds</li><li>For example, HugeGraph using the RocksDB backend to find the shortest path from the first vertex to 100 randomly selected vertices in the amazon0601 graph took a total of 0.103s.</li></ul><h6 id=conclusion-2>Conclusion</h6><ul><li>In scenarios with small data size or few vertex relationships, HugeGraph outperforms Neo4j and Titan.</li><li>As the data size increases and the degree of vertex association increases, the performance of HugeGraph and Neo4j tends to be similar, both far exceeding Titan.</li></ul><h5 id=k-neighbor-performance>K-neighbor Performance</h5><table><thead><tr><th>Vertex</th><th>Depth</th><th>Degree 1</th><th>Degree 2</th><th>Degree 3</th><th>Degree 4</th><th>Degree 5</th><th>Degree 6</th></tr></thead><tbody><tr><td>v1</td><td>Time</td><td>0.031s</td><td>0.033s</td><td>0.048s</td><td>0.500s</td><td>11.27s</td><td>OOM</td></tr><tr><td>v111</td><td>Time</td><td>0.027s</td><td>0.034s</td><td>0.115s</td><td>1.36s</td><td>OOM</td><td>&ndash;</td></tr><tr><td>v1111</td><td>Time</td><td>0.039s</td><td>0.027s</td><td>0.052s</td><td>0.511s</td><td>10.96s</td><td>OOM</td></tr></tbody></table><p><em>Explanation</em></p><ul><li>HugeGraph-Server&rsquo;s JVM memory is set to 32GB and may experience OOM when the data is too large.</li></ul><h5 id=k-out-performance>K-out performance</h5><table><thead><tr><th>Vertex</th><th>Depth</th><th>1st Degree</th><th>2nd Degree</th><th>3rd Degree</th><th>4th Degree</th><th>5th Degree</th><th>6th Degree</th></tr></thead><tbody><tr><td>v1</td><td>Time</td><td>0.054s</td><td>0.057s</td><td>0.109s</td><td>0.526s</td><td>3.77s</td><td>OOM</td></tr><tr><td>Degree</td><td>10</td><td>133</td><td>2453</td><td>50,830</td><td>1,128,688</td><td></td><td></td></tr><tr><td>v111</td><td>Time</td><td>0.032s</td><td>0.042s</td><td>0.136s</td><td>1.25s</td><td>20.62s</td><td>OOM</td></tr><tr><td>Degree</td><td>10</td><td>211</td><td>4944</td><td>113150</td><td>2,629,970</td><td></td><td></td></tr><tr><td>v1111</td><td>Time</td><td>0.039s</td><td>0.045s</td><td>0.053s</td><td>1.10s</td><td>2.92s</td><td>OOM</td></tr><tr><td>Degree</td><td>10</td><td>140</td><td>2555</td><td>50825</td><td>1,070,230</td><td></td><td></td></tr></tbody></table><p><em>Explanation</em></p><ul><li>The JVM memory of HugeGraph-Server is set to 32GB, and OOM may occur when the data is too large.</li></ul><h6 id=conclusion-3>Conclusion</h6><ul><li>In the FS scenario, HugeGraph outperforms Neo4j and Titan in terms of performance.</li><li>In the K-neighbor and K-out scenarios, HugeGraph can achieve results returned within seconds within 5 degrees.</li></ul><h4 id=24-comprehensive-performance-test---cw>2.4 Comprehensive Performance Test - CW</h4><table><thead><tr><th>Database</th><th>Size 1000</th><th>Size 5000</th><th>Size 10000</th><th>Size 20000</th></tr></thead><tbody><tr><td>HugeGraph(core)</td><td>20.804</td><td>242.099</td><td>744.780</td><td>1700.547</td></tr><tr><td>Titan</td><td>45.790</td><td>820.633</td><td>2652.235</td><td>9568.623</td></tr><tr><td>Neo4j</td><td>5.913</td><td>50.267</td><td>142.354</td><td>460.880</td></tr></tbody></table><p><em>Explanation</em></p><ul><li>The &ldquo;scale&rdquo; is based on the number of vertices.</li><li>The data in the table is the time required to complete community discovery in seconds. For example, if HugeGraph uses the RocksDB backend and operates on a dataset of 10,000 vertices, and the community aggregation is no longer changing, it takes 744.780 seconds.</li><li>The CW test is a comprehensive evaluation of CRUD operations.</li><li>In this test, HugeGraph, like Titan, did not use the client and directly operated on the core.</li></ul><h5 id=conclusion-4>Conclusion</h5><ul><li>Performance of community detection algorithm: Neo4j > HugeGraph > Titan</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-699ebe5daed825049424b7539aad30f9>8.2 - HugeGraph-API Performance</h1><p>The HugeGraph API performance test mainly tests HugeGraph-Server&rsquo;s ability to concurrently process RESTful API requests, including:</p><ul><li>Single insertion of vertices/edges</li><li>Batch insertion of vertices/edges</li><li>Vertex/Edge Queries</li></ul><p>For the performance test of the RESTful API of each release version of HugeGraph, please refer to:</p><ul><li><a href=/docs/performance/api-preformance/hugegraph-api-0.5.6-rocksdb/>v0.5.6 stand-alone</a></li><li><a href=/docs/performance/api-preformance/hugegraph-api-0.5.6-cassandra/>v0.5.6 cluster</a></li></ul><blockquote><p>Updates coming soon, stay tuned!</p></blockquote></div><div class=td-content style=page-break-before:always><h1 id=pg-dbfafc29a5e930415f78f72c47ee67f2>8.2.1 - v0.5.6 Stand-alone(RocksDB)</h1><blockquote><p><strong>Note:</strong></p><p>The current performance metrics are based on an earlier version. The <strong>latest version</strong> has significant
improvements in both performance and functionality. We encourage you to refer to the most recent release featuring
<strong>autonomous distributed storage</strong> and <strong>enhanced computational push down capabilities</strong>. Alternatively,
you may wait for the community to update the data with these enhancements.</p></blockquote><h3 id=1-test-environment>1 Test environment</h3><p>Compressed machine information:</p><table><thead><tr><th>CPU</th><th>Memory</th><th>网卡</th><th>磁盘</th></tr></thead><tbody><tr><td>48 Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz</td><td>128G</td><td>10000Mbps</td><td>750GB SSD,2.7T HDD</td></tr></tbody></table><ul><li>Information about the machine used to generate loads: configured the same as the machine that is being tested under load.</li><li>Testing tool: Apache JMeter 2.5.1</li></ul><p>Note: The load-generating machine and the machine under test are located in the same local network.</p><h3 id=2-test-description>2 Test description</h3><h4 id=21-definition-of-terms-the-unit-of-time-is-ms>2.1 Definition of terms (the unit of time is ms)</h4><ul><li>Samples: The total number of threads completed in the current scenario.</li><li>Average: The average response time.</li><li>Median: The statistical median of the response time.</li><li>90% Line: The response time below which 90% of all threads fall.</li><li>Min: The minimum response time.</li><li>Max: The maximum response time.</li><li>Error: The error rate.</li><li>Throughput: The number of requests processed per unit of time.</li><li>KB/sec: Throughput measured in terms of data transferred per second.</li></ul><h4 id=22-underlying-storage>2.2 Underlying storage</h4><p>RocksDB is used for backend storage, HugeGraph and RocksDB are both started on the same machine, and the configuration files related to the server remain as default except for the modification of the host and port.</p><h3 id=3-summary-of-performance-results>3 Summary of performance results</h3><ol><li>The speed of inserting a single vertex and edge in HugeGraph is about 1w per second</li><li>The batch insertion speed of vertices and edges is much faster than the single insertion speed</li><li>The concurrency of querying vertices and edges by id can reach more than 13000, and the average delay of requests is less than 50ms</li></ol><h3 id=4-test-results-and-analysis>4 Test results and analysis</h3><h4 id=41-batch-insertion>4.1 batch insertion</h4><h5 id=411-upper-limit-stress-testing>4.1.1 Upper limit stress testing</h5><h6 id=test-methods>Test methods</h6><p>The upper limit of stress testing is to continuously increase the concurrency and test whether the server can still provide services normally.</p><h6 id=stress-parameters>Stress Parameters</h6><p>Duration: 5 minutes</p><h6 id=maximum-insertion-speed-for-vertices>Maximum insertion speed for vertices:</h6><center><img src=/docs/images/API-perf/v0.5.6/rocksdb/vertex_batch.png alt=image></center><h6 id=in-conclusion>in conclusion:</h6><ul><li>With a concurrency of 2200, the throughput for vertices is 2026.8. This means that the system can process data at a rate of 405360 per second (2026.8 * 200).</li></ul><h6 id=maximum-insertion-speed-for-edges>Maximum insertion speed for edges</h6><center><img src=/docs/images/API-perf/v0.5.6/rocksdb/edge_batch.png alt=image></center><h6 id=conclusion>Conclusion:</h6><ul><li>With a concurrency of 900, the throughput for edges is 776.9. This means that the system can process data at a rate of 388450 per second (776.9 * 500).</li></ul><h4 id=42-single-insertion>4.2 Single insertion</h4><h5 id=421-stress-limit-testing>4.2.1 Stress limit testing</h5><h6 id=test-methods-1>Test Methods</h6><p>Stress limit testing is a process of continuously increasing the concurrency level to test the upper limit of the server&rsquo;s ability to provide normal service.</p><h6 id=stress-parameters-1>Stress parameters</h6><ul><li>Duration: 5 minutes.</li><li>Service exception indicator: Error rate greater than 0.00%.</li></ul><h6 id=single-vertex-insertion>Single vertex insertion</h6><center><img src=/docs/images/API-perf/v0.5.6/rocksdb/vertex_single.png alt=image></center><h6 id=conclusion-1>Conclusion:</h6><ul><li>With a concurrency of 11500, the throughput is 10730. This means that the system can handle a single concurrent insertion of vertices at a concurrency level of 11500.</li></ul><h6 id=single-edge-insertion>Single edge insertion</h6><center><img src=/docs/images/API-perf/v0.5.6/rocksdb/edge_single.png alt=image></center><h6 id=conclusion-2>Conclusion:</h6><ul><li>With a concurrency of 9000, the throughput is 8418. This means that the system can handle a single concurrent insertion of edges at a concurrency level of 9000.</li></ul><h4 id=43-search-by-id>4.3 Search by ID</h4><h5 id=431-stress-test-upper-limit>4.3.1 Stress test upper limit</h5><h6 id=testing-method>Testing method</h6><p>Continuously increasing the concurrency level to test the upper limit of the server&rsquo;s ability to provide service under normal conditions.</p><h6 id=stress-parameters-2>stress parameters</h6><ul><li>Duration: 5 minutes</li><li>Service abnormality indicator: error rate greater than 0.00%</li></ul><h6 id=querying-vertices-by-id>Querying vertices by ID</h6><center><img src=/docs/images/API-perf/v0.5.6/rocksdb/vertex_id_query.png alt=image></center><h6 id=conclusion-3>Conclusion:</h6><ul><li>Concurrency is 14,000, throughput is 12,663. The concurrency capacity for querying vertices by ID is 14,000, with an average delay of 44ms.</li></ul><h6 id=querying-edges-by-id>Querying edges by ID</h6><center><img src=/docs/images/API-perf/v0.5.6/rocksdb/edge_id_query.png alt=image></center><h6 id=conclusion-4>Conclusion:</h6><ul><li>Concurrency is 13,000, throughput is 12,225. The concurrency capacity for querying edges by ID is 13,000, with an average delay of 12ms.</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-fd5b165e28a07f1c35ab177b10e15dc8>8.2.2 - v0.5.6 Cluster(Cassandra)</h1><blockquote><p><strong>Note:</strong></p><p>The current performance metrics are based on an earlier version. The <strong>latest version</strong> has significant
improvements in both performance and functionality. We encourage you to refer to the most recent release featuring
<strong>autonomous distributed storage</strong> and <strong>enhanced computational push down capabilities</strong>. Alternatively,
you may wait for the community to update the data with these enhancements.</p></blockquote><h3 id=1-test-environment>1 Test environment</h3><p>Compressed machine information</p><table><thead><tr><th>CPU</th><th>Memory</th><th>网卡</th><th>磁盘</th></tr></thead><tbody><tr><td>48 Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz</td><td>128G</td><td>10000Mbps</td><td>750GB SSD,2.7T HDD</td></tr></tbody></table><ul><li>Starting Pressure Machine Information: Configure the same as the compressed machine.</li><li>Testing tool: Apache JMeter 2.5.1.</li></ul><p>Note: The machine used to initiate the load and the machine being tested are located in the same data center (or server room)</p><h3 id=2-test-description>2 Test Description</h3><h4 id=21-definition-of-terms-the-unit-of-time-is-ms>2.1 Definition of terms (the unit of time is ms)</h4><ul><li>Samples &ndash; The total number of threads completed in this scenario.</li><li>Average &ndash; The average response time.</li><li>Median &ndash; The median response time in statistical terms.</li><li>90% Line &ndash; The response time below which 90% of all threads fall.</li><li>Min &ndash; The minimum response time.</li><li>Max &ndash; The maximum response time.</li><li>Error &ndash; The error rate.</li><li>Throughput &ndash; The number of transactions processed per unit of time.</li><li>KB/sec &ndash; The throughput measured in terms of data transmitted per second.</li></ul><h4 id=22-low-level-storage>2.2 Low-Level Storage</h4><p>A 15-node Cassandra cluster is used for backend storage. HugeGraph and the Cassandra cluster are located on separate servers. Server-related configuration files are modified only for host and port settings, while the rest remain default.</p><h3 id=3-summary-of-performance-results>3 Summary of Performance Results</h3><ol><li>The speed of a single vertex and edge insertion in HugeGraph is 9000 and 4500 per second, respectively.</li><li>The speed of bulk vertex and edge insertion is 50,000 and 150,000 per second, respectively, which is much higher than the single insertion speed.</li><li>The concurrency for querying vertices and edges by ID can reach more than 12,000, and the average request delay is less than 70ms.</li></ol><h3 id=4-test-results-and-analysis>4 Test Results and Analysis</h3><h4 id=41-batch-insertion>4.1 Batch Insertion</h4><h5 id=411-pressure-upper-limit-test>4.1.1 Pressure Upper Limit Test</h5><h6 id=test-method>Test Method</h6><p>Continuously increase the concurrency level to test the upper limit of the server&rsquo;s ability to provide services.</p><h6 id=pressure-parameters>Pressure Parameters</h6><p>Duration: 5 minutes.</p><h6 id=maximum-insertion-speed-of-vertices>Maximum Insertion Speed of Vertices:</h6><center><img src=/docs/images/API-perf/v0.5.6/cassandra/vertex_batch.png alt=image></center><h6 id=conclusion>Conclusion:</h6><ul><li>At a concurrency level of 3500, the throughput of vertices is 261, and the amount of data processed per second is 52,200 (261 * 200).</li></ul><h6 id=maximum-insertion-speed-of-edges>Maximum Insertion Speed of Edges:</h6><center><img src=/docs/images/API-perf/v0.5.6/cassandra/edge_batch.png alt=image></center><h6 id=conclusion-1>Conclusion:</h6><ul><li>At a concurrency level of 1000, the throughput of edges is 323, and the amount of data processed per second is 161,500 (323 * 500).</li></ul><h4 id=42-single-insertion>4.2 Single Insertion</h4><h5 id=421-pressure-upper-limit-test>4.2.1 Pressure Upper Limit Test</h5><h6 id=test-method-1>Test Method</h6><p>Continuously increase the concurrency level to test the upper limit of the server&rsquo;s ability to provide services.</p><h6 id=pressure-parameters-1>Pressure Parameters</h6><ul><li>Duration: 5 minutes.</li><li>Service exception mark: Error rate greater than 0.00%.</li></ul><h6 id=single-insertion-of-vertices>Single Insertion of Vertices:</h6><center><img src=/docs/images/API-perf/v0.5.6/cassandra/vertex_single.png alt=image></center><h6 id=conclusion-2>Conclusion:</h6><ul><li>At a concurrency level of 9000, the throughput is 8400, and the single-insertion concurrency capability for vertices is 9000.</li></ul><h6 id=single-insertion-of-edges>Single Insertion of Edges:</h6><center><img src=/docs/images/API-perf/v0.5.6/cassandra/edge_single.png alt=image></center><h6 id=conclusion-3>Conclusion:</h6><ul><li>At a concurrency level of 4500, the throughput is 4160, and the single-insertion concurrency capability for edges is 4500.</li></ul><h4 id=43-query-by-id>4.3 Query by ID</h4><h5 id=431-pressure-upper-limit-test>4.3.1 Pressure Upper Limit Test</h5><h6 id=test-method-2>Test Method</h6><p>Continuously increase the concurrency and test the upper limit of the pressure that the server can still provide services normally.</p><h6 id=pressure-parameters-2>Pressure Parameters</h6><ul><li>Duration: 5 minutes</li><li>Service exception flag: error rate greater than 0.00%</li></ul><h6 id=query-by-id-for-vertices>Query by ID for vertices</h6><center><img src=/docs/images/API-perf/v0.5.6/cassandra/vertex_id_query.png alt=image></center><h6 id=conclusion-4>Conclusion:</h6><ul><li>The concurrent capacity of the vertex search by ID is 14500, with a throughput of 13576 and an average delay of 11ms.</li></ul><h6 id=edge-search-by-id>Edge search by ID</h6><center><img src=/docs/images/API-perf/v0.5.6/cassandra/edge_id_query.png alt=image></center><h6 id=conclusion-5>Conclusion:</h6><ul><li>For edge ID-based queries, the server&rsquo;s concurrent capacity is up to 12,000, with a throughput of 10,688 and an average latency of 63ms.</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-8e73cd18ae7e460700391440de46c404>8.3 - HugeGraph-Loader Performance</h1><blockquote><p><strong>Note:</strong></p><p>The current performance metrics are based on an earlier version. The <strong>latest version</strong> has significant
improvements in both performance and functionality. We encourage you to refer to the most recent release featuring
<strong>autonomous distributed storage</strong> and <strong>enhanced computational push down capabilities</strong>. Alternatively,
you may wait for the community to update the data with these enhancements.</p></blockquote><h2 id=use-cases>Use Cases</h2><p>When the number of graph data to be batch inserted (including vertices and edges) is at the billion level or below,
or the total data size is less than TB, the <a href=/docs/quickstart/hugegraph-loader>HugeGraph-Loader</a> tool can be used to continuously and quickly import
graph data.</p><h2 id=performance>Performance</h2><blockquote><p>The test uses the edge data of website.</p></blockquote><h3 id=rocksdb-single-machine-performance-update-multi-raft--rocksdb-cluster-is-supported-now>RocksDB single-machine performance (Update: multi-raft + rocksdb cluster is supported now)</h3><ul><li>When the label index is turned off, 228k edges/s.</li><li>When the label index is turned on, 153k edges/s.</li></ul><h3 id=cassandra-cluster-performance>Cassandra cluster performance</h3><ul><li>When label index is turned on by default, 63k edges/s.</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-0b6ebbdbce17d47f26fcb874226e5edc>8.4 -</h1><h3 id=1-测试环境>1 测试环境</h3><h4 id=11-硬件信息>1.1 硬件信息</h4><table><thead><tr><th>CPU</th><th>Memory</th><th>网卡</th><th>磁盘</th></tr></thead><tbody><tr><td>48 Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz</td><td>128G</td><td>10000Mbps</td><td>750GB SSD</td></tr></tbody></table><h4 id=12-软件信息>1.2 软件信息</h4><h5 id=121-测试用例>1.2.1 测试用例</h5><p>测试使用<a href=https://github.com/socialsensor/graphdb-benchmarks>graphdb-benchmark</a>,一个图数据库测试集。该测试集主要包含4类测试:</p><ul><li><p>Massive Insertion,批量插入顶点和边,一定数量的顶点或边一次性提交</p></li><li><p>Single Insertion,单条插入,每个顶点或者每条边立即提交</p></li><li><p>Query,主要是图数据库的基本查询操作:</p><ul><li>Find Neighbors,查询所有顶点的邻居</li><li>Find Adjacent Nodes,查询所有边的邻接顶点</li><li>Find Shortest Path,查询第一个顶点到100个随机顶点的最短路径</li></ul></li><li><p>Clustering,基于Louvain Method的社区发现算法</p></li></ul><h5 id=122-测试数据集>1.2.2 测试数据集</h5><p>测试使用人造数据和真实数据</p><ul><li><p>MIW、SIW和QW使用SNAP数据集</p><ul><li><p><a href=http://snap.stanford.edu/data/email-Enron.html>Enron Dataset</a></p></li><li><p><a href=http://snap.stanford.edu/data/amazon0601.html>Amazon dataset</a></p></li><li><p><a href=http://snap.stanford.edu/data/com-Youtube.html>Youtube dataset</a></p></li><li><p><a href=http://snap.stanford.edu/data/com-LiveJournal.html>LiveJournal dataset</a></p></li></ul></li><li><p>CW使用<a href=https://sites.google.com/site/andrealancichinetti/files>LFR-Benchmark generator</a>生成的人造数据</p></li></ul><h6 id=本测试用到的数据集规模>本测试用到的数据集规模</h6><table><thead><tr><th>名称</th><th>vertex数目</th><th>edge数目</th><th>文件大小</th></tr></thead><tbody><tr><td>email-enron.txt</td><td>36,691</td><td>367,661</td><td>4MB</td></tr><tr><td>com-youtube.ungraph.txt</td><td>1,157,806</td><td>2,987,624</td><td>38.7MB</td></tr><tr><td>amazon0601.txt</td><td>403,393</td><td>3,387,388</td><td>47.9MB</td></tr></tbody></table><h4 id=13-服务配置>1.3 服务配置</h4><ul><li>HugeGraph版本:0.4.4,RestServer和Gremlin Server和backends都在同一台服务器上</li><li>Cassandra版本:cassandra-3.10,commit-log 和data共用SSD</li><li>RocksDB版本:rocksdbjni-5.8.6</li><li>Titan版本:0.5.4, 使用thrift+Cassandra模式</li></ul><blockquote><p>graphdb-benchmark适配的Titan版本为0.5.4</p></blockquote><h3 id=2-测试结果>2 测试结果</h3><h4 id=21-batch插入性能>2.1 Batch插入性能</h4><table><thead><tr><th>Backend</th><th>email-enron(30w)</th><th>amazon0601(300w)</th><th>com-youtube.ungraph(300w)</th></tr></thead><tbody><tr><td>Titan</td><td>9.516</td><td>88.123</td><td>111.586</td></tr><tr><td>RocksDB</td><td>2.345</td><td>14.076</td><td>16.636</td></tr><tr><td>Cassandra</td><td>11.930</td><td>108.709</td><td>101.959</td></tr><tr><td>Memory</td><td>3.077</td><td>15.204</td><td>13.841</td></tr></tbody></table><p><em>说明</em></p><ul><li>表头"()&ldquo;中数据是数据规模,以边为单位</li><li>表中数据是批量插入的时间,单位是s</li><li>例如,HugeGraph使用RocksDB插入amazon0601数据集的300w条边,花费14.076s,速度约为21w edges/s</li></ul><h5 id=结论>结论</h5><ul><li>RocksDB和Memory后端插入性能优于Cassandra</li><li>HugeGraph和Titan同样使用Cassandra作为后端的情况下,插入性能接近</li></ul><h4 id=22-遍历性能>2.2 遍历性能</h4><h5 id=221-术语说明>2.2.1 术语说明</h5><ul><li>FN(Find Neighbor), 遍历所有vertex, 根据vertex查邻接edge, 通过edge和vertex查other vertex</li><li>FA(Find Adjacent), 遍历所有edge,根据edge获得source vertex和target vertex</li></ul><h5 id=222-fn性能>2.2.2 FN性能</h5><table><thead><tr><th>Backend</th><th>email-enron(3.6w)</th><th>amazon0601(40w)</th><th>com-youtube.ungraph(120w)</th></tr></thead><tbody><tr><td>Titan</td><td>7.724</td><td>70.935</td><td>128.884</td></tr><tr><td>RocksDB</td><td>8.876</td><td>65.852</td><td>63.388</td></tr><tr><td>Cassandra</td><td>13.125</td><td>126.959</td><td>102.580</td></tr><tr><td>Memory</td><td>22.309</td><td>207.411</td><td>165.609</td></tr></tbody></table><p><em>说明</em></p><ul><li>表头&rdquo;()&ldquo;中数据是数据规模,以顶点为单位</li><li>表中数据是遍历顶点花费的时间,单位是s</li><li>例如,HugeGraph使用RocksDB后端遍历amazon0601的所有顶点,并查找邻接边和另一顶点,总共耗时65.852s</li></ul><h5 id=223-fa性能>2.2.3 FA性能</h5><table><thead><tr><th>Backend</th><th>email-enron(30w)</th><th>amazon0601(300w)</th><th>com-youtube.ungraph(300w)</th></tr></thead><tbody><tr><td>Titan</td><td>7.119</td><td>63.353</td><td>115.633</td></tr><tr><td>RocksDB</td><td>6.032</td><td>64.526</td><td>52.721</td></tr><tr><td>Cassandra</td><td>9.410</td><td>102.766</td><td>94.197</td></tr><tr><td>Memory</td><td>12.340</td><td>195.444</td><td>140.89</td></tr></tbody></table><p><em>说明</em></p><ul><li>表头&rdquo;()&ldquo;中数据是数据规模,以边为单位</li><li>表中数据是遍历边花费的时间,单位是s</li><li>例如,HugeGraph使用RocksDB后端遍历amazon0601的所有边,并查询每条边的两个顶点,总共耗时64.526s</li></ul><h6 id=结论-1>结论</h6><ul><li>HugeGraph RocksDB > Titan thrift+Cassandra > HugeGraph Cassandra > HugeGraph Memory</li></ul><h4 id=23-hugegraph-图常用分析方法性能>2.3 HugeGraph-图常用分析方法性能</h4><h5 id=术语说明>术语说明</h5><ul><li>FS(Find Shortest Path), 寻找最短路径</li><li>K-neighbor,从起始vertex出发,通过K跳边能够到达的所有顶点, 包括1, 2, 3&mldr;(K-1), K跳边可达vertex</li><li>K-out, 从起始vertex出发,恰好经过K跳out边能够到达的顶点</li></ul><h5 id=fs性能>FS性能</h5><table><thead><tr><th>Backend</th><th>email-enron(30w)</th><th>amazon0601(300w)</th><th>com-youtube.ungraph(300w)</th></tr></thead><tbody><tr><td>Titan</td><td>11.333</td><td>0.313</td><td>376.06</td></tr><tr><td>RocksDB</td><td>44.391</td><td>2.221</td><td>268.792</td></tr><tr><td>Cassandra</td><td>39.845</td><td>3.337</td><td>331.113</td></tr><tr><td>Memory</td><td>35.638</td><td>2.059</td><td>388.987</td></tr></tbody></table><p><em>说明</em></p><ul><li>表头&rdquo;()&ldquo;中数据是数据规模,以边为单位</li><li>表中数据是找到<strong>从第一个顶点出发到达随机选择的100个顶点的最短路径</strong>的时间,单位是s</li><li>例如,HugeGraph使用RocksDB查找第一个顶点到100个随机顶点的最短路径,总共耗时2.059s</li></ul><h6 id=结论-2>结论</h6><ul><li>在数据规模小或者顶点关联关系少的场景下,Titan最短路径性能优于HugeGraph</li><li>随着数据规模增大且顶点的关联度增高,HugeGraph最短路径性能优于Titan</li></ul><h5 id=k-neighbor性能>K-neighbor性能</h5><table><thead><tr><th>顶点</th><th>深度</th><th>一度</th><th>二度</th><th>三度</th><th>四度</th><th>五度</th><th>六度</th></tr></thead><tbody><tr><td>v1</td><td>时间</td><td>0.031s</td><td>0.033s</td><td>0.048s</td><td>0.500s</td><td>11.27s</td><td>OOM</td></tr><tr><td>v111</td><td>时间</td><td>0.027s</td><td>0.034s</td><td>0.115</td><td>1.36s</td><td>OOM</td><td>&ndash;</td></tr><tr><td>v1111</td><td>时间</td><td>0.039s</td><td>0.027s</td><td>0.052s</td><td>0.511s</td><td>10.96s</td><td>OOM</td></tr></tbody></table><p><em>说明</em></p><ul><li>HugeGraph-Server的JVM内存设置为32GB,数据量过大时会出现OOM</li></ul><h5 id=k-out性能>K-out性能</h5><table><thead><tr><th>顶点</th><th>深度</th><th>一度</th><th>二度</th><th>三度</th><th>四度</th><th>五度</th><th>六度</th></tr></thead><tbody><tr><td>v1</td><td>时间</td><td>0.054s</td><td>0.057s</td><td>0.109s</td><td>0.526s</td><td>3.77s</td><td>OOM</td></tr><tr><td></td><td>10</td><td>133</td><td>2453</td><td>50,830</td><td>1,128,688</td><td></td><td></td></tr><tr><td>v111</td><td>时间</td><td>0.032s</td><td>0.042s</td><td>0.136s</td><td>1.25s</td><td>20.62s</td><td>OOM</td></tr><tr><td></td><td>10</td><td>211</td><td>4944</td><td>113150</td><td>2,629,970</td><td></td><td></td></tr><tr><td>v1111</td><td>时间</td><td>0.039s</td><td>0.045s</td><td>0.053s</td><td>1.10s</td><td>2.92s</td><td>OOM</td></tr><tr><td></td><td>10</td><td>140</td><td>2555</td><td>50825</td><td>1,070,230</td><td></td><td></td></tr></tbody></table><p><em>说明</em></p><ul><li>HugeGraph-Server的JVM内存设置为32GB,数据量过大时会出现OOM</li></ul><h6 id=结论-3>结论</h6><ul><li>FS场景,HugeGraph性能优于Titan</li><li>K-neighbor和K-out场景,HugeGraph能够实现在5度范围内秒级返回结果</li></ul><h4 id=24-图综合性能测试-cw>2.4 图综合性能测试-CW</h4><table><thead><tr><th>数据库</th><th>规模1000</th><th>规模5000</th><th>规模10000</th><th>规模20000</th></tr></thead><tbody><tr><td>Titan</td><td>45.943</td><td>849.168</td><td>2737.117</td><td>9791.46</td></tr><tr><td>Memory(core)</td><td>41.077</td><td>1825.905</td><td>*</td><td>*</td></tr><tr><td>Cassandra(core)</td><td>39.783</td><td>862.744</td><td>2423.136</td><td>6564.191</td></tr><tr><td>RocksDB(core)</td><td>33.383</td><td>199.894</td><td>763.869</td><td>1677.813</td></tr></tbody></table><p><em>说明</em></p><ul><li>&ldquo;规模"以顶点为单位</li><li>表中数据是社区发现完成需要的时间,单位是s,例如HugeGraph使用RocksDB后端在规模10000的数据集,社区聚合不再变化,需要耗时763.869s</li><li>&ldquo;*&ldquo;表示超过10000s未完成</li><li>CW测试是CRUD的综合评估</li><li>后三者分别是HugeGraph的不同后端,该测试中HugeGraph跟Titan一样,没有通过client,直接对core操作</li></ul><h5 id=结论-4>结论</h5><ul><li>HugeGraph在使用Cassandra后端时,性能略优于Titan,随着数据规模的增大,优势越来越明显,数据规模20000时,比Titan快30%</li><li>HugeGraph在使用RocksDB后端时,性能远高于Titan和HugeGraph的Cassandra后端,分别比两者快了6倍和4倍</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-99a93ef9534d11fef4be3e4b3b1a6381>9 - Contribution Guidelines</h1></div><div class=td-content><h1 id=pg-17ea1d6a1e6627d08a7d6f4d2898cca1>9.1 - How to Contribute to HugeGraph</h1><p>Thanks for taking the time to contribute! As an open source project, HugeGraph is looking forward to be contributed from everyone, and we are also grateful to all the contributors.</p><p>The following is a contribution guide for HugeGraph:</p><img width=884 alt=image src=https://user-images.githubusercontent.com/9625821/159643158-8bf72c0a-93c3-4a58-8912-7b2ab20ced1d.png><h2 id=1-preparation>1. Preparation</h2><p>Optional: You can use <a href=https://desktop.github.com/>GitHub desktop</a> to greatly simplify the commit and update process.</p><p>We can contribute by reporting issues, submitting code patches or any other feedback.</p><p>Before submitting the code, we need to do some preparation:</p><ol><li><p>Sign up or login to GitHub: <a href=https://github.com>https://github.com</a></p></li><li><p>Fork HugeGraph repo from GitHub: <a href=https://github.com/apache/hugegraph/fork>https://github.com/apache/incubator-hugegraph/fork</a></p></li><li><p>Clone code from fork repo to local: <a href=https://github.com/$%7BGITHUB_USER_NAME%7D/hugegraph>https://github.com/${GITHUB_USER_NAME}/hugegraph</a></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># clone code from remote to local repo</span>
</span></span><span style=display:flex><span>git clone https://github.com/<span style=color:#4e9a06>${</span><span style=color:#000>GITHUB_USER_NAME</span><span style=color:#4e9a06>}</span>/hugegraph
</span></span></code></pre></div></li><li><p>Configure local HugeGraph repo</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#204a87>cd</span> hugegraph
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># add upstream to synchronize the latest code</span>
</span></span><span style=display:flex><span>git remote add hugegraph https://github.com/apache/hugegraph
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># set name and email to push code to github</span>
</span></span><span style=display:flex><span>git config user.name <span style=color:#4e9a06>&#34;{full-name}&#34;</span> <span style=color:#8f5902;font-style:italic># like &#34;Jermy Li&#34;</span>
</span></span><span style=display:flex><span>git config user.email <span style=color:#4e9a06>&#34;{email-address-of-github}&#34;</span> <span style=color:#8f5902;font-style:italic># like &#34;jermy@apache.org&#34;</span>
</span></span></code></pre></div></li></ol><h2 id=2-create-an-issue-on-github>2. Create an Issue on GitHub</h2><p>If you encounter bugs or have any questions, please go to <a href=https://github.com/apache/incubator-hugegraph/issues>GitHub Issues</a> to report them and feel free to <a href=https://github.com/apache/hugegraph/issues/new>create an issue</a>.</p><h2 id=3-make-changes-of-code-locally>3. Make changes of code locally</h2><h4 id=31-create-a-new-branch>3.1 Create a new branch</h4><p>Please don&rsquo;t use master branch for development. We should create a new branch instead:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># checkout master branch</span>
</span></span><span style=display:flex><span>git checkout master
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># pull the latest code from official hugegraph</span>
</span></span><span style=display:flex><span>git pull hugegraph
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># create new branch: bugfix-branch</span>
</span></span><span style=display:flex><span>git checkout -b bugfix-branch
</span></span></code></pre></div><h4 id=32-change-the-code>3.2 Change the code</h4><p>Assume that we need to modify some files like &ldquo;HugeGraph.java&rdquo; and &ldquo;HugeFactory.java&rdquo;:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># modify code to fix a bug</span>
</span></span><span style=display:flex><span>vim hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java
</span></span><span style=display:flex><span>vim hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># run test locally (optional)</span>
</span></span><span style=display:flex><span>mvn <span style=color:#204a87>test</span> -Pcore-test,memory
</span></span></code></pre></div><p>Note: In order to be consistent with the code style easily, if you use <a href=https://www.jetbrains.com/idea/>IDEA</a> as your IDE, you can directly <a href=https://www.jetbrains.com/help/idea/configuring-code-style.html>import</a> our code style <a href=./hugegraph-style.xml>configuration file</a>.</p><h5 id=321-check-licenses>3.2.1 Check licenses</h5><p>If we want to add new third-party dependencies to the <code>HugeGraph</code> project, we need to do the following things:</p><ol><li>Find the third-party dependent repository, put the dependent <code>license</code> file into <a href=https://github.com/apache/incubator-hugegraph/tree/master/hugegraph-server/hugegraph-dist/release-docs/licenses>./hugegraph-dist/release-docs/licenses/</a> path.</li><li>Declare the dependency in <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/release-docs/LICENSE>./hugegraph-dist/release-docs/LICENSE</a> <code>LICENSE</code> information.</li><li>Find the NOTICE file in the repository and append it to <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/release-docs/NOTICE>./hugegraph-dist/release-docs/NOTICE</a> file (skip this step if there is no NOTICE file).</li><li>Execute locally <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh>./hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh</a> to update the dependency list <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/scripts/dependency/known-dependencies.txt>known-dependencies.txt</a> (or manually update) .</li></ol><p><strong>Example</strong>: A new third-party dependency is introduced into the project -> <code>ant-1.9.1.jar</code></p><ul><li>The project source code is located at: <a href=https://github.com/apache/ant/tree/rel/1.9.1>https://github.com/apache/ant/tree/rel/1.9.1</a></li><li>LICENSE file: <a href=https://github.com/apache/ant/blob/rel/1.9.1/LICENSE>https://github.com/apache/ant/blob/rel/1.9.1/LICENSE</a></li><li>NOTICE file: <a href=https://github.com/apache/ant/blob/rel/1.9.1/NOTICE>https://github.com/apache/ant/blob/rel/1.9.1/NOTICE</a></li></ul><p>The license information of <code>ant-1.9.1.jar</code> needs to be specified in the LICENSE file, and the notice information needs to be specified in the NOTICE file. The detailed LICENSE file corresponding to ant-1.9.1.jar needs to be copied to our licenses/ directory. Finally update the known-dependencies.txt file.</p><h4 id=33-commit-changes-to-git-repo>3.3 Commit changes to git repo</h4><p>After the code has been completed, we submit them to the local git repo:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># add files to local git index</span>
</span></span><span style=display:flex><span>git add hugegraph-core/src/main/java/org/apache/hugegraph/HugeGraph.java
</span></span><span style=display:flex><span>git add hugegraph-core/src/main/java/org/apache/hugegraph/HugeFactory.java
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># commit to local git repo</span>
</span></span><span style=display:flex><span>git commit
</span></span></code></pre></div><p>Please edit the commit message after running <code>git commit</code>, we can explain what and how to fix a bug or implement a feature, the following is an example:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-sh data-lang=sh><span style=display:flex><span>Fix bug: run deploy multiple <span style=color:#204a87>times</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>fix <span style=color:#8f5902;font-style:italic>#ISSUE_ID</span>
</span></span></code></pre></div><blockquote><p>Please remember to fill in the issue id, which was generated by GitHub after issue creation.</p></blockquote><h4 id=34-push-commit-to-github-fork-repo>3.4 Push commit to GitHub fork repo</h4><p>Push the local commit to GitHub fork repo:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># push the local commit to fork repo</span>
</span></span><span style=display:flex><span>git push origin bugfix-branch:bugfix-branch
</span></span></code></pre></div><p>Note that since GitHub requires submitting code through <code>username + token</code> (instead of using <code>username + password</code> directly), you need to create a GitHub token from <a href=https://github.com/settings/tokens>https://github.com/settings/tokens</a>:
<img width=1280 alt=image src=https://user-images.githubusercontent.com/9625821/163524204-7fe0e6bf-9c8b-4b1a-ac65-6a0ac423eb16.png></p><h2 id=4-create-a-pull-request>4. Create a Pull Request</h2><p>Go to the web page of GitHub fork repo, there would be a chance to create a Pull Request after pushing to a new branch, just click button &ldquo;Compare & pull request&rdquo; to do it. Then edit the description for proposed changes, which can just be copied from the commit message.</p><p>Note: please make sure the email address you used to submit the code is bound to the GitHub account. For how to bind the email address, please refer to <a href=https://github.com/settings/emails>https://github.com/settings/emails</a>:
<img width=1280 alt=image src=https://user-images.githubusercontent.com/9625821/163522445-2a50a72a-dea2-434f-9868-3a0d40d0d037.png></p><h2 id=5-code-review>5. Code review</h2><p>Maintainers will start the code review after all the <strong>automatic</strong> checks are passed:</p><ul><li>Check: Contributor License Agreement is signed</li><li>Check: Travis CI builds is passed (automatically Test and Deploy)</li></ul><p>The commit will be accepted and merged if there is no problem after review.</p><p>Please click on &ldquo;Details&rdquo; to find the problem if any check does not pass.</p><p>If there are checks not passed or changes requested, then continue to modify the code and push again.</p><h2 id=6-more-changes-after-review>6. More changes after review</h2><p>If we have not passed the review, don&rsquo;t be discouraged. Usually a commit needs to be reviewed several times before being accepted! Please follow the review comments and make further changes.</p><p>After the further changes, we submit them to the local repo:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># commit all updated files in a new commit,</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># please feel free to enter any appropriate commit message, note that</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># we will squash all commits in the pull request as one commit when</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># merging into the master branch.</span>
</span></span><span style=display:flex><span>git commit -a
</span></span></code></pre></div><blockquote><p>If there are conflicts that prevent the code from being merged, we need to rebase on master branch:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># synchronize the latest code</span>
</span></span><span style=display:flex><span>git checkout master
</span></span><span style=display:flex><span>git pull hugegraph
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># rebase on master</span>
</span></span><span style=display:flex><span>git checkout bugfix-branch
</span></span><span style=display:flex><span>git rebase -i master
</span></span></code></pre></div></blockquote><p>And push it to GitHub fork repo again:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span><span style=color:#8f5902;font-style:italic># force push the local commit to fork repo</span>
</span></span><span style=display:flex><span>git push -f origin bugfix-branch:bugfix-branch
</span></span></code></pre></div><p>GitHub will automatically update the Pull Request after we push it, just wait for code review.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-dc89ef117bed0b0ef3c6487f9a6a8bd0>9.2 - Subscribe Mailing Lists</h1><h3 id=subscribe-the-mailing-list>Subscribe the mailing list</h3><p>Subscribe to the mailing list by following steps:</p><ul><li>Email <a href=mailto:dev-subscribe@hugegraph.apache.org>dev-subscribe@hugegraph.apache.org</a> through your email account, and then you will receive a confirmation email.</li><li>Reply to the confirmation email to confirm your subscription. Then, you will receive another confirmation email.</li><li>Now you are a subscriber of the mailing list. If you have more questions, just email the mailing list and someone will reply to you soon.</li></ul><p>You can subscribe to the mailing list anytime you want. Additionally, you can check <a href=https://lists.apache.org/list.html?dev@hugegraph.apache.org>historical emails / all emails</a> easily (even if you are not subscribing to the list).</p><p>Some notes:</p><ul><li>If you don&rsquo;t receive the confirmation email, please send it after 24 hours later.</li><li>Don&rsquo;t email to <strong>dev</strong> until you subscribe to the mailing list successfully (otherwise the mail will be banned).</li></ul><p>HugeGraph offers an email list for development and user discussions.</p><ul><li>hugegraph-dev: <a href=mailto:dev@hugegraph.apache.org>dev@hugegraph.apache.org</a> for both development and users discussions.</li></ul><p>More information on mailing subscribe can be found at:</p><ul><li><a href=https://lists.apache.org/list.html?dev@hugegraph.apache.org>https://lists.apache.org/list.html?dev@hugegraph.apache.org</a></li><li><a href=http://apache.org/foundation/mailinglists.html#subscribing>http://apache.org/foundation/mailinglists.html#subscribing</a></li></ul><h1 id=unsubscribe-mailing-lists>Unsubscribe Mailing Lists</h1><p>If you do not need to know what&rsquo;s going on with HugeGraph, you can unsubscribe from the mailing list.</p><p>Unsubscribe from the mailing list steps are as follows:</p><ol><li><p>Email <a href=mailto:dev-unsubscribe@hugegraph.apache.org>dev-unsubscribe@hugegraph.apache.org</a> with your subscribed email address, subject and content are arbitrary.</p></li><li><p>Receive confirmation email and reply. After completing step 1, you will receive a confirmation email from <a href=mailto:dev-help@hugegraph.apache.org>dev-help@hugegraph.apache.org</a> (if not received, please confirm whether the email is automatically classified as spam, promotion email, subscription email, etc.) . Then reply directly to the email, or click on the link in the email to reply quickly, the subject and content are arbitrary.</p></li><li><p>Receive a goodbye email. After completing the above steps, you will receive a goodbye email with the subject GOODBYE from <a href=mailto:dev@hugegraph.apache.org>dev@hugegraph.apache.org</a>, and you have successfully unsubscribed to the Apache HugeGraph mailing list, and you will not receive emails from <a href=mailto:dev@hugegraph.apache.org>dev@hugegraph.apache.org</a>.</p></li></ol></div><div class=td-content style=page-break-before:always><h1 id=pg-07536ba8fd0a4ba5975f821978cf0009>9.3 - Validate Apache Release</h1><blockquote><p>Note: this doc will be updated continuously.
It is recommended to use Java11 in verification, we will drop Java8 support from version 1.5.0</p></blockquote><h2 id=verification>Verification</h2><p>When the internal temporary release and packaging work is completed, other community developers (
especially PMC) need to participate in the <a href=https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist>verification link</a>
To ensure the &ldquo;correctness + completeness&rdquo; of someone&rsquo;s published version, here requires **everyone
** to participate as much as possible, and then explain which items you have <strong>checked</strong> in the
subsequent <strong>email reply</strong>.(The following are the core items)</p><h4 id=1-prepare>1. prepare</h4><p>If there is no svn or gpg or wget environment locally, it is recommended to install it first
(windows recommend using WSL2 environment, or at least <code>git-bash</code>), also make sure to install java
(recommended 11) and maven software</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 1. install svn</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># ubuntu/debian</span>
</span></span><span style=display:flex><span>sudo apt install subversion -y
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># MacOS</span>
</span></span><span style=display:flex><span>brew install subversion
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># To verify that the installation was successful, execute the following command:</span>
</span></span><span style=display:flex><span>svn --version
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 2. install gpg</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># ubuntu/debian</span>
</span></span><span style=display:flex><span>sudo apt-get install gnupg -y
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># MacOS</span>
</span></span><span style=display:flex><span>brew install gnupg
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># To verify that the installation was successful, execute the following command:</span>
</span></span><span style=display:flex><span>gpg --version
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 3. install wget (we will enhance it later, like use `curl`)</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># ubuntu/debian</span>
</span></span><span style=display:flex><span>sudo apt-get install wget -y
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># MacOS</span>
</span></span><span style=display:flex><span>brew install wget
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 4. Download the hugegraph-svn directory </span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># For version number, pay attention to fill in the verification version</span>
</span></span><span style=display:flex><span>svn co https://dist.apache.org/repos/dist/dev/incubator/hugegraph/1.x.x/
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># (Note) If svn downloads a file very slowly, </span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># you can consider wget to download a single file, as follows (or consider using a proxy)</span>
</span></span><span style=display:flex><span>wget https://dist.apache.org/repos/dist/dev/incubator/hugegraph/1.x.x/apache-hugegraph-toolchain-incubating-1.x.x.tar.gz
</span></span></code></pre></div><h4 id=2-check-hash-value>2. check hash value</h4><p>First you need to check the file integrity of the <code>source + binary</code> package, Verify by <code>shasum</code> to
ensure that it is consistent with the hash value published on apache/GitHub (Usually sha512), Here
is the same as the last step of 0x02 inspection.</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>execute the following command:
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>for</span> i in *.tar.gz<span style=color:#000;font-weight:700>;</span> <span style=color:#204a87;font-weight:700>do</span> <span style=color:#204a87>echo</span> <span style=color:#000>$i</span><span style=color:#000;font-weight:700>;</span> shasum -a <span style=color:#0000cf;font-weight:700>512</span> --check <span style=color:#000>$i</span>.sha512<span style=color:#000;font-weight:700>;</span> <span style=color:#204a87;font-weight:700>done</span>
</span></span></code></pre></div><h4 id=3-check-gpg-signature>3. check gpg signature</h4><p>This is to ensure that the published package is uploaded by a <strong>reliable</strong> person.
Assuming tom signs and uploads,
others should download A&rsquo;s <strong>public key</strong> and then perform <strong>signature
confirmation</strong>.</p><p>Related commands:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 1. Download project trusted public key to local (required for the first time) &amp; import</span>
</span></span><span style=display:flex><span>curl https://downloads.apache.org/incubator/hugegraph/KEYS &gt; KEYS
</span></span><span style=display:flex><span>gpg --import KEYS
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># After importing, you can see the following output, which means that x user public keys have been imported</span>
</span></span><span style=display:flex><span>gpg: /home/ubuntu/.gnupg/trustdb.gpg: trustdb created
</span></span><span style=display:flex><span>gpg: key BA7E78F8A81A885E: public key <span style=color:#4e9a06>&#34;imbajin (apache mail) &lt;jin@apache.org&gt;&#34;</span> imported
</span></span><span style=display:flex><span>gpg: key 818108E7924549CC: public key <span style=color:#4e9a06>&#34;vaughn &lt;vaughn@apache.org&gt;&#34;</span> imported
</span></span><span style=display:flex><span>gpg: key 28DCAED849C4180E: public key <span style=color:#4e9a06>&#34;coderzc (CODE SIGNING KEY) &lt;zhaocong@apache.org&gt;&#34;</span> imported
</span></span><span style=display:flex><span>...
</span></span><span style=display:flex><span>gpg: Total number processed: x
</span></span><span style=display:flex><span>gpg: imported: x
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 2. Trust release users (trust n username mentioned in voting mail, if more than one user, </span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># just repeat the steps in turn or use the script below)</span>
</span></span><span style=display:flex><span>gpg --edit-key <span style=color:#000>$USER</span> <span style=color:#8f5902;font-style:italic># input the username, enter the interactive mode</span>
</span></span><span style=display:flex><span>gpg&gt; trust
</span></span><span style=display:flex><span>...output options..
</span></span><span style=display:flex><span>Your decision? <span style=color:#0000cf;font-weight:700>5</span> <span style=color:#8f5902;font-style:italic># select 5</span>
</span></span><span style=display:flex><span>Do you really want to <span style=color:#204a87>set</span> this key to ultimate trust? <span style=color:#ce5c00;font-weight:700>(</span>y/N<span style=color:#ce5c00;font-weight:700>)</span> y <span style=color:#8f5902;font-style:italic># slect y, then q quits trusting the next user</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># (Optional) You could also use the command to trust one user in non-interactive mode:</span>
</span></span><span style=display:flex><span><span style=color:#204a87>echo</span> -e <span style=color:#4e9a06>&#34;5\ny\n&#34;</span> <span style=color:#000;font-weight:700>|</span> gpg --batch --command-fd <span style=color:#0000cf;font-weight:700>0</span> --edit-key <span style=color:#000>$USER</span> trust
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Or use the script to auto import all public gpg keys (be carefully):</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>for</span> key in <span style=color:#204a87;font-weight:700>$(</span>gpg --no-tty --list-keys --with-colons <span style=color:#000;font-weight:700>|</span> awk -F: <span style=color:#4e9a06>&#39;/^pub/ {print $5}&#39;</span><span style=color:#204a87;font-weight:700>)</span><span style=color:#000;font-weight:700>;</span> <span style=color:#204a87;font-weight:700>do</span>
</span></span><span style=display:flex><span> <span style=color:#204a87>echo</span> -e <span style=color:#4e9a06>&#34;5\ny\n&#34;</span> <span style=color:#000;font-weight:700>|</span> gpg --batch --command-fd <span style=color:#0000cf;font-weight:700>0</span> --edit-key <span style=color:#4e9a06>&#34;</span><span style=color:#000>$key</span><span style=color:#4e9a06>&#34;</span> trust
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>done</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 3. Check the signature (make sure there is no Warning output, every source/binary file prompts Good Signature)</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>#Single file verification</span>
</span></span><span style=display:flex><span>gpg --verify xx.asc xxx-src.tar.gz
</span></span><span style=display:flex><span>gpg --verify xx.asc xxx.tar.gz <span style=color:#8f5902;font-style:italic># Note: without the bin/binary suffix</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># One-click shell traversal verification (recommended)</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>for</span> i in *.tar.gz<span style=color:#000;font-weight:700>;</span> <span style=color:#204a87;font-weight:700>do</span> <span style=color:#204a87>echo</span> <span style=color:#000>$i</span><span style=color:#000;font-weight:700>;</span> gpg --verify <span style=color:#000>$i</span>.asc <span style=color:#000>$i</span> <span style=color:#000;font-weight:700>;</span> <span style=color:#204a87;font-weight:700>done</span>
</span></span></code></pre></div><p>First confirm the overall integrity/consistency, and then confirm the specific content (<strong>key</strong>)</p><h4 id=4-check-the-archive-contents>4. Check the archive contents</h4><p>Check the contents of the archive downloaded from preparation work. Divided into two aspects: source code package + binary package, The source code package is stricter, it can be said that the core part (Because it is longer, For a complete list refer to
the official <a href=https://cwiki.apache.org/confluence/display/INCUBATOR/Incubator+Release+Checklist>Wiki</a>)</p><h5 id=a-source-package>A. source package</h5><p>After decompressing <code>*hugegraph*src.tar.gz</code>, Do the following checks:</p><ol><li>folders with <code>incubating</code>, and no <strong>empty</strong> files/folders</li><li><code>LICENSE</code> + <code>NOTICE</code> + <code>DISCLAIM</code> file exists and the content is normal</li><li><strong>does not exist</strong> binaries (without LICENSE)</li><li>The source code files all contain the standard <code>ASF License</code> header (this could be done with
the <code>Maven-MAT</code> plugin)</li><li>Check whether the <code>pom.xml</code> version number of each parent/child module is consistent (and meet
expectations)</li><li>Finally, make sure the source code works/compiles correctly</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># prefer to use/switch to `java 11` for the following operations (compiling/running) (Note: `Computer` only supports `java &gt;= 11`)</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># java --version</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># try to compile in the Unix env to check if it works well</span>
</span></span><span style=display:flex><span>mvn clean package -P stage -Dmaven.test.skip<span style=color:#ce5c00;font-weight:700>=</span><span style=color:#204a87>true</span> -Dcheckstyle.skip<span style=color:#ce5c00;font-weight:700>=</span><span style=color:#204a87>true</span>
</span></span></code></pre></div><h5 id=b-binary-package>B. binary package</h5><p>After decompressing <code>xxx-hugegraph.tar.gz</code>, perform the following checks:</p><ol><li>folders with <code>incubating</code></li><li><code>LICENSE</code> and <code>NOTICE</code> file exists and the content is normal</li><li>start server</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># hugegraph-server</span>
</span></span><span style=display:flex><span>bin/start-hugegraph.sh
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># hugegraph-loader</span>
</span></span><span style=display:flex><span>bin/hugegraph-loader.sh -g hugegraph -f example/file/struct.json -s example/file/schema.groovy
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># hugegraph-hubble</span>
</span></span><span style=display:flex><span>bin/start-hubble.sh
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>more reference official website: https://hugegraph.apache.org/docs/quickstart
</span></span></code></pre></div><p><strong>Note:</strong> If a third-party dependency is introduced in the binary package, you need to update the
LICENSE and add the third-party dependent LICENSE; if the third-party dependent LICENSE is Apache
2.0, and the corresponding project contains NOTICE, you also need to update Our NOTICE file</p><h4 id=5-check-the-official-website-and-github-and-other-pages>5. Check the official website and GitHub and other pages</h4><ol><li>Make sure that the official website at least meets <a href=https://whimsy.apache.org/pods/project/hugegraph>apache website check</a>,
and no circular links, etc.</li><li>Update <strong>download link</strong> and release notes updated</li><li>&mldr;</li></ol><h2 id=mail-template>Mail Template</h2><p>After the check & test, you should reply to the mail with the following content: (normal devs & PMC)</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-markdown data-lang=markdown><span style=display:flex><span>[] +1 approve
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>[] +0 no opinion
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>[] -1 disapprove with the reason
</span></span></code></pre></div><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-markdown data-lang=markdown><span style=display:flex><span>+1 (non-binding)
</span></span><span style=display:flex><span>I checked:
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>1.</span> Download link/tag in mail are valid
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>2.</span> Checksum and GPG signatures are OK
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>3.</span> LICENSE <span style=color:#a40000>&amp;</span> NOTICE <span style=color:#a40000>&amp;</span> DISCLAIMER are exist
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>4.</span> Build successfully on XX OS <span style=color:#a40000>&amp;</span> Version XX
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>5.</span> No unexpected binary files
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>6.</span> Date is right in the NOTICE file
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>7.</span> Compile from source is fine under JavaXX
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>8.</span> No empty file <span style=color:#a40000>&amp;</span> directory found
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>9.</span> Test running XXX service OK
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>10.</span> ....
</span></span></code></pre></div><p>and the PMC members should reply with <code>binding</code>, it&rsquo;s important for summary the valid votes:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-markdown data-lang=markdown><span style=display:flex><span>+1 (binding)
</span></span><span style=display:flex><span>I checked:
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>1.</span> Download link/tag in mail are valid
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>2.</span> Checksum and GPG signatures are OK
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>3.</span> LICENSE <span style=color:#a40000>&amp;</span> NOTICE <span style=color:#a40000>&amp;</span> DISCLAIMER are exist
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>4.</span> Build successfully on XX OS <span style=color:#a40000>&amp;</span> Version XX
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>5.</span> No unexpected binary files
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>6.</span> Date is right in the NOTICE file
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>7.</span> Compile from source is fine under JavaXX
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>8.</span> No empty file <span style=color:#a40000>&amp;</span> directory found
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>9.</span> Test running XX process OK
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>10.</span> ....
</span></span></code></pre></div></div><div class=td-content style=page-break-before:always><h1 id=pg-c89774a4e231af418639f53a926ea188>9.4 - Setup Server in IDEA (Dev)</h1><blockquote><p>NOTE: The following configuration is for reference purposes only, and has been tested on Linux and macOS platforms based on <a href=https://github.com/apache/incubator-hugegraph/commit/a946ad1de4e8f922251a5241ffc957c33379677f>this version</a>.</p></blockquote><h3 id=background>Background</h3><p>The <a href=/docs/quickstart/hugegraph-server/>Quick Start</a> section provides instructions on how to start and stop HugeGraph-Server using <strong>scripts</strong>. In this guide, we will explain how to run and debug HugeGraph-Server on the Linux platform using <strong>IntelliJ IDEA</strong>.</p><p>The core steps for local startup are the same as starting with <strong>scripts</strong>:</p><ol><li>Initialize the database backend by executing the <code>InitStore</code> class to initialize the graph.</li><li>Start HugeGraph-Server by executing the <code>HugeGraphServer</code> class to load the initialized graph information and start the server.</li></ol><p>Before proceeding with the following process, make sure that you have cloned the source code of HugeGraph
and have configured the development environment, such as <code>Java 11</code> & you could config your local environment
with this <a href=https://github.com/apache/incubator-hugegraph/wiki/The-style-config-for-HugeGraph-in-IDEA>config-doc</a></p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>git clone https://github.com/apache/hugegraph.git
</span></span></code></pre></div><h3 id=steps>Steps</h3><h4 id=1-copy-configuration-files>1. Copy Configuration Files</h4><p>To avoid the impact of configuration file changes on Git tracking, it is recommended to copy the required configuration files to a separate folder. Run the following command to copy the files:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>cp -r hugegraph-dist/src/assembly/static/scripts hugegraph-dist/src/assembly/static/conf path-to-your-directory
</span></span></code></pre></div><p>Replace <code>path-to-your-directory</code> with the path to the directory where you want to copy the files.</p><h4 id=2-configure-initstore-to-initialize-the-graph>2. Configure <code>InitStore</code> to initialize the graph</h4><p>First, you need to configure the database backend in the configuration files. In this example, we will use RocksDB. Open <code>path-to-your-directory/conf/graphs/hugegraph.properties</code> and configure it as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>backend=rocksdb
</span></span><span style=display:flex><span>serializer=binary
</span></span><span style=display:flex><span>rocksdb.data_path=.
</span></span><span style=display:flex><span>rocksdb.wal_path=.
</span></span></code></pre></div><p>Next, open the <code>Run/Debug Configurations</code> panel in IntelliJ IDEA and create a new Application configuration. Follow these steps for the configuration:</p><ul><li>Select <code>hugegraph-dist</code> as the <code>Use classpath of module</code>.</li><li>Set the <code>Main class</code> to <code>org.apache.hugegraph.cmd.InitStore</code>.</li><li>Set the program arguments to <code>conf/rest-server.properties</code>. Note that the path here is relative to the working directory, so make sure to set the working directory to <code>path-to-your-directory</code>.</li></ul><blockquote><p>If <strong>user authentication</strong> (authenticator) is configured for HugeGraph-Server in the <strong>Java 11</strong> environment, you need to refer to the script <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/bin/init-store.sh#L52>configuration</a> in the binary package and add the following <strong>VM options</strong>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>--add-exports<span style=color:#ce5c00;font-weight:700>=</span>java.base/jdk.internal.reflect<span style=color:#ce5c00;font-weight:700>=</span>ALL-UNNAMED
</span></span></code></pre></div><p>Otherwise, an error will occur:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>lang</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>reflect</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>InaccessibleObjectException</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000>Unable</span> <span style=color:#000>to</span> <span style=color:#000>make</span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>synchronized</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>jdk</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>internal</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>reflect</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>Reflection</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>registerFieldsToFilter</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>lang</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>Class</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>lang</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>String</span><span style=color:#ce5c00;font-weight:700>[])</span> <span style=color:#000>accessible</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000>module</span> <span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>base</span> <span style=color:#000>does</span> <span style=color:#000>not</span> <span style=color:#4e9a06>&#34;exports jdk.internal.reflect&#34;</span> <span style=color:#000>to</span> <span style=color:#000>unnamed</span> <span style=color:#000>module</span> <span style=color:#5c35cc;font-weight:700>@xxx</span>
</span></span></code></pre></div></blockquote><p>Once the configuration is completed, run it. If the execution is successful, the following runtime logs will be displayed:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>37</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>u</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ConfigUtil</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Scanning</span> <span style=color:#000>option</span> <span style=color:#a40000>&#39;</span><span style=color:#000>graphs</span><span style=color:#a40000>&#39;</span> <span style=color:#000>directory</span> <span style=color:#a40000>&#39;</span><span style=color:#ce5c00;font-weight:700>./</span><span style=color:#000>conf</span><span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000>graphs</span><span style=color:#a40000>&#39;</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>37</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>c</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>InitStore</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Init</span> <span style=color:#000>graph</span> <span style=color:#000>with</span> <span style=color:#000>config</span> <span style=color:#000>file</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#ce5c00;font-weight:700>./</span><span style=color:#000>conf</span><span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000>graphs</span><span style=color:#ce5c00;font-weight:700>/</span><span style=color:#000>hugegraph</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>properties</span>
</span></span><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>......</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>b</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>s</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>r</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>RocksDBStore</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Write</span> <span style=color:#000>down</span> <span style=color:#000>the</span> <span style=color:#000>backend</span> <span style=color:#000>version</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>11</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>StandardHugeGraph</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Graph</span> <span style=color:#a40000>&#39;</span><span style=color:#000>hugegraph</span><span style=color:#a40000>&#39;</span> <span style=color:#000>has</span> <span style=color:#000>been</span> <span style=color:#000>initialized</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>StandardHugeGraph</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Close</span> <span style=color:#000>graph</span> <span style=color:#000>standardhugegraph</span><span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>hugegraph</span><span style=color:#ce5c00;font-weight:700>]</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>db</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>open</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>b</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>s</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>r</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>RocksDBStore</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Opening</span> <span style=color:#000>RocksDB</span> <span style=color:#000>with</span> <span style=color:#000>data</span> <span style=color:#000>path</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#ce5c00;font-weight:700>./</span><span style=color:#000>m</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>db</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>open</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>b</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>s</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>r</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>RocksDBStore</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Opening</span> <span style=color:#000>RocksDB</span> <span style=color:#000>with</span> <span style=color:#000>data</span> <span style=color:#000>path</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#ce5c00;font-weight:700>./</span><span style=color:#000>s</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>db</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>open</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>b</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>s</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>r</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>RocksDBStore</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Opening</span> <span style=color:#000>RocksDB</span> <span style=color:#000>with</span> <span style=color:#000>data</span> <span style=color:#000>path</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#ce5c00;font-weight:700>./</span><span style=color:#000>g</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>HugeFactory</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>HugeFactory</span> <span style=color:#000>shutdown</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>43</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>39</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>hugegraph</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>shutdown</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>h</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>HugeFactory</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>HugeGraph</span> <span style=color:#000>is</span> <span style=color:#000>shutting</span> <span style=color:#000>down</span>
</span></span></code></pre></div><h4 id=3-running-hugegraphserver>3. Running <code>HugeGraphServer</code></h4><p>Similarly, open the <code>Run/Debug Configurations</code> panel in IntelliJ IDEA and create a new <code>Application</code> configuration. Follow these steps for the configuration:</p><ul><li>Select <code>hugegraph-dist</code> as the <code>Use classpath of module</code>.</li><li>Set the <code>Main class</code> to <code>org.apache.hugegraph.dist.HugeGraphServer</code>.</li><li>Set the program arguments to <code>conf/gremlin-server.yaml conf/rest-server.properties</code>. Similarly, note that the path here is relative to the working directory, so make sure to set the working directory to <code>path-to-your-directory</code>.</li></ul><blockquote><p>Similarly, if <strong>user authentication</strong> (authenticator) is configured for HugeGraph-Server in the <strong>Java 11</strong> environment, you need to refer to the script <a href=https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/bin/hugegraph-server.sh#L124>configuration</a> in the binary package and add the following <strong>VM options</strong>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>--add-exports<span style=color:#ce5c00;font-weight:700>=</span>java.base/jdk.internal.reflect<span style=color:#ce5c00;font-weight:700>=</span>ALL-UNNAMED --add-modules<span style=color:#ce5c00;font-weight:700>=</span>jdk.unsupported --add-exports<span style=color:#ce5c00;font-weight:700>=</span>java.base/sun.nio.ch<span style=color:#ce5c00;font-weight:700>=</span>ALL-UNNAMED
</span></span></code></pre></div><p>Otherwise, an error will occur:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>lang</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>reflect</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>InaccessibleObjectException</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000>Unable</span> <span style=color:#000>to</span> <span style=color:#000>make</span> <span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>synchronized</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>jdk</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>internal</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>reflect</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>Reflection</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>registerFieldsToFilter</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>lang</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>Class</span><span style=color:#ce5c00;font-weight:700>,</span><span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>lang</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>String</span><span style=color:#ce5c00;font-weight:700>[])</span> <span style=color:#000>accessible</span><span style=color:#ce5c00;font-weight:700>:</span> <span style=color:#000>module</span> <span style=color:#000>java</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>base</span> <span style=color:#000>does</span> <span style=color:#000>not</span> <span style=color:#4e9a06>&#34;exports jdk.internal.reflect&#34;</span> <span style=color:#000>to</span> <span style=color:#000>unnamed</span> <span style=color:#000>module</span> <span style=color:#5c35cc;font-weight:700>@xxx</span>
</span></span></code></pre></div></blockquote><p>Once the configuration is completed, run it. If you see the following logs, it means that <code>HugeGraphServer</code> has been successfully started:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#ce5c00;font-weight:700>......</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>51</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>56</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>server</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>boss</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>t</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>s</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>GremlinServer</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Gremlin</span> <span style=color:#000>Server</span> <span style=color:#000>configured</span> <span style=color:#000>with</span> <span style=color:#000>worker</span> <span style=color:#000>thread</span> <span style=color:#000>pool</span> <span style=color:#000>of</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>gremlin</span> <span style=color:#000>pool</span> <span style=color:#000>of</span> <span style=color:#000>8</span> <span style=color:#000>and</span> <span style=color:#000>boss</span> <span style=color:#000>thread</span> <span style=color:#000>pool</span> <span style=color:#000>of</span> <span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>.</span>
</span></span><span style=display:flex><span><span style=color:#000>2023</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>06</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>05</span> <span style=color:#000>00</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>51</span><span style=color:#ce5c00;font-weight:700>:</span><span style=color:#000>56</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>gremlin</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>server</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>boss</span><span style=color:#ce5c00;font-weight:700>-</span><span style=color:#000>1</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#ce5c00;font-weight:700>[</span><span style=color:#000>INFO</span><span style=color:#ce5c00;font-weight:700>]</span> <span style=color:#000>o</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>a</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>t</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>g</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>s</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>GremlinServer</span> <span style=color:#ce5c00;font-weight:700>-</span> <span style=color:#000>Channel</span> <span style=color:#000>started</span> <span style=color:#000>at</span> <span style=color:#000>port</span> <span style=color:#000>8182</span><span style=color:#ce5c00;font-weight:700>.</span>
</span></span></code></pre></div><h4 id=4-debugging-hugegraphserver-optional>4. Debugging <code>HugeGraphServer</code> (optional)</h4><p>After completing the above configuration, you can try debugging <code>HugeGraphServer</code>. Run <code>HugeGraphServer</code> in debug mode and set a breakpoint at the following <a href=https://github.com/apache/hugegraph/blob/a946ad1de4e8f922251a5241ffc957c33379677f/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java#L238>location</a>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#204a87;font-weight:700>public</span> <span style=color:#000>String</span> <span style=color:#000>list</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#5c35cc;font-weight:700>@Context</span> <span style=color:#000>GraphManager</span> <span style=color:#000>manager</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@PathParam</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;graph&#34;</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#000>String</span> <span style=color:#000>graph</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#5c35cc;font-weight:700>@QueryParam</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;label&#34;</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#000>String</span> <span style=color:#000>label</span><span style=color:#ce5c00;font-weight:700>,</span>
</span></span><span style=display:flex><span> <span style=color:#5c35cc;font-weight:700>@QueryParam</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>&#34;properties&#34;</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#000>String</span> <span style=color:#000>properties</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#ce5c00;font-weight:700>......)</span> <span style=color:#ce5c00;font-weight:700>{</span>
</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic>// ignore log
</span></span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic></span> <span style=color:#000>Map</span><span style=color:#ce5c00;font-weight:700>&lt;</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>Object</span><span style=color:#ce5c00;font-weight:700>&gt;</span> <span style=color:#000>props</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>parseProperties</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>properties</span><span style=color:#ce5c00;font-weight:700>);</span>
</span></span></code></pre></div><p>Then use the RESTful API to request <code>HugeGraphServer</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>curl <span style=color:#4e9a06>&#34;http://localhost:8080/graphs/hugegraph/graph/vertices&#34;</span> <span style=color:#000;font-weight:700>|</span> gunzip
</span></span></code></pre></div><p>At this point, you can view detailed variable information in the debugger.</p><h4 id=5-log4j2-configuration>5. Log4j2 Configuration</h4><p>By default, when running <code>InitStore</code> and <code>HugeGraphServer</code>, the Log4j2 configuration file path read is <code>hugegraph-dist/src/main/resources/log4j2.xml</code>, not <code>path-to-your-directory/conf/log4j2.xml</code>. This configuration file is read when starting HugeGraph-Server using the <strong>script</strong>.</p><p>To avoid maintaining two separate configuration files, you can modify the Log4j2 configuration file path when running and debugging HugeGraph-Server in <strong>IntelliJ IDEA</strong>:</p><ol><li>Open the previously created <code>Application</code> configuration.</li><li>Click on <code>Modify options</code> - <code>Add VM options</code>.</li><li>Set the VM options to <code>-Dlog4j.configurationFile=conf/log4j2.xml</code>.</li></ol><h3 id=possible-issues>Possible Issues</h3><h4 id=1-java-package-sunmisc-does-not-exist>1. java: package sun.misc does not exist</h4><p>The reason may be that cross-compilation is triggered when using Java 11 to compile, causing the symbol of <code>sun.misc.Unsafe</code> used in the project to not be found. There are two possible solutions:</p><ol><li>In IntelliJ IDEA, go to <code>Preferences/Settings</code> and find the <code>Java Compiler</code> panel. Then, disable the <code>--release</code> option (recommended).</li><li>Set the Project SDK to 8 (Deprecated soon).</li></ol><h4 id=2-java-storeraftrpcraftrequests-does-not-exist-rpc-generated-files>2. java: *.store.raft.rpc.RaftRequests does not exist (RPC Generated Files)</h4><p>The reason is that the source code didn&rsquo;t include the <code>RPC-generated</code> files. You could try 2 ways to fix it:</p><ol><li>[CMD]<code>mvn clean compile</code> in the <strong>root</strong> directory (Recommend)</li><li>[UI] right click on the <code>hugegraph</code> repo and select <code>Maven->Generate Sources and Update Folders</code>. This will rebuild the repo and correctly generate the required files.</li></ol><h4 id=3-unable-to-print-location-information-l-in-log4j2>3. Unable to Print Location Information (%l) in Log4j2</h4><p>This is because Log4j2 uses asynchronous loggers. You can refer to the <a href=https://logging.apache.org/log4j/2.x/manual/layouts.html#LocationInformation>official documentation</a> for configuration details.</p><hr><h3 id=references>References</h3><ol><li><a href=/docs/quickstart/hugegraph-server/>HugeGraph-Server Quick Start</a></li><li><a href=https://gist.github.com/imbajin/1661450f000cd62a67e46d4f1abfe82c>Local Debugging Guide for HugeGraph Server (Win/Unix)</a></li><li><a href=https://youtrack.jetbrains.com/issue/IDEA-180033>&ldquo;package sun.misc does not exist&rdquo; compilation error</a></li><li><a href=https://youtrack.jetbrains.com/issue/IDEA-201168>Cannot compile: java: package sun.misc does not exist</a></li><li><a href=https://github.com/apache/incubator-hugegraph/wiki/The-style-config-for-HugeGraph-in-IDEA>The code-style config for HugeGraph in IDEA</a></li></ol></div><div class=td-content style=page-break-before:always><h1 id=pg-e1fc3666faccec72ead94a2ed6a9f8a3>9.5 - Apache HugeGraph Committer Guide</h1><blockquote><p>This document outlines the requirements and process for becoming an Apache Committer. The corresponding ASF official document can be found at: <a href=https://community.apache.org/newcommitter.html>https://community.apache.org/newcommitter.html</a></p></blockquote><h1 id=candidate-requirements>Candidate Requirements</h1><ol><li>Candidates must adhere to the <a href=https://www.apache.org/foundation/policies/conduct.html>Apache Code of Conduct</a>.</li><li>PMC members will assess candidates&rsquo; interactions with others and contributions through <a href=https://lists.apache.org/list?dev@hugegraph.apache.org>mailing lists</a>, <a href=https://github.com/apache/hugegraph/issues>issues</a>, <a href=https://github.com/apache/incubator-hugegraph/pulls>pull requests</a>, and <a href=https://hugegraph.apache.org/docs>official documentation</a>.</li><li>Considerations for evaluating candidates as potential Committers include:<ol><li>Ability to collaborate with community members</li><li>Mentorship capabilities</li><li>Community involvement</li><li>Level of contribution</li><li>Personal skills/abilities</li></ol></li></ol><h1 id=nomination-process>Nomination Process</h1><p><strong>Discussion → Vote → Invitation → Announcement</strong></p><h2 id=1-initiate-community-discussion-discuss>1. Initiate Community Discussion (DISCUSS)</h2><p>Any (P)PMC member of HugeGraph can initiate a voting discussion. After identifying valuable contributions from a community contributor and obtaining the candidate&rsquo;s consent, a discussion can be initiated via <a href=mailto:private@hugegraph.apache.org>private@hugegraph.apache.org</a>.
The initiator of the discussion should clearly state the candidate&rsquo;s contributions in the discussion email and provide URLs or other information for confirming the contributions, facilitating discussion and analysis.</p><p>Below is a template for HugeGraph emails: (For reference only)</p><blockquote><p>Note: The term <code>xxx</code> will be used to refer to the candidate. Typically, <code>xxx</code> represents an easily readable name (e.g., <code>Simon Jay</code>).</p><p>ASF-INFRA recommends <strong>avoiding</strong> the use of less readable <code>ID</code> directly as a reference to the person in emails (e.g., avoid <code>simon321</code> or <code>wh0isSim0n</code> 😄).</p><p>In addition, it is best to choose the <strong>&ldquo;pure text&rdquo;</strong> mode, otherwise the typesetting may be chaotic in the ASF Mailing-list UI</p></blockquote><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-markdown data-lang=markdown><span style=display:flex><span>To: private@hugegraph.apache.org
</span></span><span style=display:flex><span>Subject: [DISCUSS] XXX as a HugeGraph Committer Candidate
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Hi all:
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>I am pleased to nominate xxx for the role of HugeGraph Committer based on his/her contributions over the past few months.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>[ Candidate&#39;s Contribution Summary ]
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Here are the relevant PRs (issues) he/she has participated in:
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>**Core Features:**</span>
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>-</span> Feature 1: [ Reference Links ]
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>-</span> ...
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>**Fix/Chore/Release:**</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#000;font-weight:700>**Doc:**</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>[ Candidate&#39;s Current Notable Contributions ]
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>His/Her contributions bring the following benefits to the community, helping us in the following ways:
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>[ Candidate&#39;s Contributions and Benefits to the Community ]
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>In view of the above contributions, I elect xxx as Committer of the HugeGraph project.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>[ Reference Links ]
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>1.</span> PR1
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>2.</span> PR2
</span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>3.</span> ...
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Welcome everyone to share opinions~
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Thanks!
</span></span></code></pre></div><p>For contribution links in discussion emails, you can use the statistical feature of <a href=https://github.com/search>GitHub Search</a> by entering corresponding keywords as needed. You can also adjust parameters and add new repositories such as <code>repo:apache/incubator-hugegraph-computer</code>. Pay special attention to adjusting the <strong>time range</strong> (below is a template reference, please adjust the parameters accordingly):</p><ul><li>Number of PR submissions<ul><li><code>is:pr author:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li><li>Lines of code submissions/changes<ul><li><a href="https://github.com/apache/incubator-hugegraph/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c">https://github.com/apache/incubator-hugegraph/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c</a></li><li><a href="https://github.com/apache/incubator-hugegraph-doc/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c">https://github.com/apache/incubator-hugegraph-doc/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c</a></li></ul></li><li>Number of PR submissions associated with issues<ul><li><code>linked:issue involves:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li><li>Number of PR reviews<ul><li><code>type:pr reviewed-by:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li><li>Number of merge commits<ul><li><code>type:pr author:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li><li>Effective lines merged<ul><li><a href="https://github.com/apache/incubator-hugegraph/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c">https://github.com/apache/incubator-hugegraph/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c</a></li><li><a href="https://github.com/apache/incubator-hugegraph-doc/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c">https://github.com/apache/incubator-hugegraph-doc/graphs/contributors?from=2023-06-01&to=2023-12-25&type=c</a></li></ul></li><li>Number of issue submissions<ul><li><code>type:issue author:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li><li>Number of issue fixes<ul><li>Based on the number of issue submissions, select those with a closed status.</li></ul></li><li>Number of issue participations<ul><li><code>type:issue involves:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li><li>Number of issue comments<ul><li><code>type:issue commenter:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li><li>Number of PR comments<ul><li><code>type:pr commenter:xxx repo:apache/incubator-hugegraph repo:apache/incubator-hugegraph-doc created:>2023-06-01 updated:&lt;2023-12-25</code></li></ul></li></ul><p>For participation in mailing lists, you can use <a href="https://lists.apache.org/list?dev@hugegraph.apache.org:lte=10M:xxx">https://lists.apache.org/list?dev@hugegraph.apache.org:lte=10M:xxx</a>.</p><h2 id=2-initiate-community-voting-email-vote>2. Initiate Community Voting Email (VOTE)</h2><p>If there are no dissenting opinions within the specified time frame of the discussion email, the initiator of the discussion needs to initiate a voting email for the committer election at <a href=mailto:private@hugegraph.apache.org>private@hugegraph.apache.org</a>.</p><p>Below is the corresponding email template:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>To: private@hugegraph.apache.org
</span></span><span style=display:flex><span>Subject: [VOTE] xxx as a HugeGraph Committer
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Hi all:
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Through the discussion of last week:
</span></span><span style=display:flex><span>[ Discussion Mailing List Link ]
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>We have discussed and listed what xxx participated in the HugeGraph community.
</span></span><span style=display:flex><span>I believe making him/her a Committer will enhance the work for HugeGraph.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>So, I am happy to call VOTE to accept xxx as a HugeGraph Committer.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Voting will continue for at least 72 hours or until the required number of votes is reached.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Please vote accordingly:
</span></span><span style=display:flex><span>[ ] +1 approve
</span></span><span style=display:flex><span>[ ] +0 no opinion
</span></span><span style=display:flex><span>[ ] -1 disapprove with the reason
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Thanks!
</span></span></code></pre></div><p>Then, (P)PMC members reply to the email with +1 or -1 to express their opinions. Generally, at least 3 votes of +1 are needed to conclude the vote.</p><h2 id=announcement-of-voting-results-result>Announcement of Voting Results (RESULT)</h2><p>After the voting email concludes, the initiator of the vote needs to remind the end of the voting in the email. Additionally, the initiator needs to announce the voting results via email to <a href=mailto:private@hugegraph.apache.org>private@hugegraph.apache.org</a>. The email template can be as follows:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>To: private@hugegraph.apache.org
</span></span><span style=display:flex><span>Subject: [RESULTS][VOTE] xxx as a HugeGraph Committer
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Hi all: The vote for &#34;xxx&#34; as an HugeGraph Committer has PASSED and closed now.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>The result is as follows: X PMC +1 Votes:
</span></span><span style=display:flex><span>- A (PMC ID)
</span></span><span style=display:flex><span>- B
</span></span><span style=display:flex><span>- C...
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Vote thread:
</span></span><span style=display:flex><span>put vote thread link here
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Then I&#39;m going to invite xxx to join us soon. Thanks for everyone&#39;s support!
</span></span></code></pre></div><h2 id=send-invitation-email-to-candidate-invite>Send Invitation Email to Candidate (INVITE)</h2><p>After the announcement of the voting results email is sent, the initiator of the vote should send an invitation email to the candidate. The invitation email is addressed to the candidate and cc&rsquo;d to <a href=mailto:private@hugegraph.apache.org>private@hugegraph.apache.org</a>. The invited candidate must reply to the specified email address to accept or reject the invitation.</p><p>Below is a template for reference:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>To: [ Candidate&#39;s Email ]
</span></span><span style=display:flex><span>Cc: private@hugegraph.apache.org
</span></span><span style=display:flex><span>Subject: Invitation to become HugeGraph committer: xxx
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Hello xxx,
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>The HugeGraph Project Management Committee (PPMC)
</span></span><span style=display:flex><span>hereby offers you committer privileges to the project.
</span></span><span style=display:flex><span>These privileges are offered on the understanding that you&#39;ll use them
</span></span><span style=display:flex><span>reasonably and with common sense. We like to work on trust
</span></span><span style=display:flex><span>rather than unnecessary constraints.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Being a committer enables you to more easily make
</span></span><span style=display:flex><span>changes without needing to go through the patch
</span></span><span style=display:flex><span>submission process.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Being a committer does not require you to
</span></span><span style=display:flex><span>participate any more than you already do. It does
</span></span><span style=display:flex><span>tend to make one even more committed. You will
</span></span><span style=display:flex><span>probably find that you spend more time here.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Of course, you can decline and instead remain as a
</span></span><span style=display:flex><span>contributor, participating as you do now.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>A. This personal invitation is a chance for you to
</span></span><span style=display:flex><span>accept or decline in private. Either way, please
</span></span><span style=display:flex><span>let us know in reply to the private@hugegraph.apache.org
</span></span><span style=display:flex><span>address only.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>B. If you accept, the next step is to register an iCLA:
</span></span><span style=display:flex><span> 1. Details of the iCLA and the forms are found
</span></span><span style=display:flex><span> through this link: https://www.apache.org/licenses/#clas
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> 2. Instructions for its completion and return to
</span></span><span style=display:flex><span> the Secretary of the ASF are found at
</span></span><span style=display:flex><span> https://www.apache.org/licenses/#submitting
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span> 3. When you transmit the completed iCLA, request
</span></span><span style=display:flex><span> to notify the Apache HugeGraph project and choose a
</span></span><span style=display:flex><span> unique Apache ID. Look to see if your preferred
</span></span><span style=display:flex><span> ID is already taken at
</span></span><span style=display:flex><span> https://people.apache.org/committer-index.html
</span></span><span style=display:flex><span> This will allow the Secretary to notify the PMC
</span></span><span style=display:flex><span> when your iCLA has been recorded.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>When recording of your iCLA is noted, you will
</span></span><span style=display:flex><span>receive a follow-up message with the next steps for
</span></span><span style=display:flex><span>establishing you as a committer.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>With the expectation of your acceptance, welcome!
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>The Apache HugeGraph(incubating) PPMC
</span></span></code></pre></div><h2 id=candidate-accepts-invitation-accept>Candidate Accepts Invitation (ACCEPT)</h2><p>The candidate should reply to the aforementioned email (select <strong>reply all</strong>) to indicate acceptance of the invitation. Below is a template for the email:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>To: [ Sender&#39;s Email ]
</span></span><span style=display:flex><span>Cc: private@hugegraph.apache.org
</span></span><span style=display:flex><span>Subject: Re: Invitation to become HugeGraph committer: xxx
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Hello Apache HugeGraph(incubating) PPMC,
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>I accept the invitation.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Thanks to the Apache HugeGraph Community for recognizing my work, I
</span></span><span style=display:flex><span>will continue to actively participate in the work of the Apache
</span></span><span style=display:flex><span>HugeGraph(incubating).
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Next, I will follow the instructions to complete the next steps:
</span></span><span style=display:flex><span>Signing and submitting iCLA and registering Apache ID.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>xxx
</span></span></code></pre></div><p>Of course, the candidate may also choose to decline the invitation, in which case there is no template:)</p><p>Once the invitation is accepted, the candidate needs to complete the following tasks:</p><ul><li>Subscribe to <a href=mailto:dev@hugegraph.apache.org>dev@hugegraph.apache.org</a>, for specific steps/filtering configurations, please refer to the <a href=https://hugegraph.apache.org/docs/contribution-guidelines/subscribe/>documentation</a></li><li>Sign the <a href=https://www.apache.org/licenses/icla.pdf>ICLA</a>, follow the steps below↓</li></ul><h3 id=icla-signing-process>ICLA Signing Process</h3><ol><li>Download the <a href=https://www.apache.org/licenses/icla.pdf>ICLA</a></li><li>Open the PDF and fill in the required information. All fields must be filled in English. It is recommended to use a PDF tool to edit and sign.<ol><li><strong>Full name</strong>: First name followed by last name</li><li><strong>Public name</strong>: Optional, defaults to the same as <code>Full name</code></li><li>Check the box only if you entered names with your family name first</li><li><strong>Postal Address</strong>: English address, starting from small to large, including detailed street address</li><li><strong>Country:</strong> Country of residence in English</li><li><strong>E-mail</strong>: Email address, preferably the same as the one used in the invitation email</li><li><strong>(optional) preferred Apache id(s)</strong>: Choose an SVN ID that is not listed on the <a href=http://people.apache.org/committer-index.html>Apache committer</a> page</li><li><strong>(optional) notify project</strong>: Apache HugeGraph(incubating)</li><li><strong>Signature: Must be handwritten using a PDF tool</strong></li><li><strong>Date:</strong> Format as xxxx-xx-xx</li></ol></li><li>After signing, rename <code>icla.pdf</code> to <code>name-pinyin-icla.pdf</code></li><li>Send the following email and attach <code>name-pinyin-icla.pdf</code> as a reference.</li></ol><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>To: secretary@apache.org
</span></span><span style=display:flex><span>Subject: ICLA Information
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Hello everyone:
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>I have accepted the Apache HugeGraph(incubating) PPMC invitation to
</span></span><span style=display:flex><span>become a HugeGraph committer, the attachment is my ICLA information.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>(Optional) My GitHub account is https://github.com/xxx. Thanks!
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>xxx
</span></span></code></pre></div><blockquote><p>For more details, please refer to <a href=https://github.com/apache/hugegraph/issues/1732>https://github.com/apache/hugegraph/issues/1732</a>.</p></blockquote><p>PMC members will await confirmation of the ICLA record from the Apache secretary team. Candidates and PMC members will receive the following email:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>Dear xxx,
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>This message acknowledges receipt of your ICLA, which has been filed in the Apache Software Foundation records.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Your account (with id xxx) has been requested for you and you should receive email with next steps
</span></span><span style=display:flex><span>within the next few days (this process can take up to a week).
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Please refer to https://www.apache.org/foundation/how-it-works.html#developers
</span></span><span style=display:flex><span>for more information about roles at Apache.
</span></span></code></pre></div><h3 id=setting-up-apache-account-and-development-environment-config>Setting Up Apache Account and Development Environment (CONFIG)</h3><p>After the record is completed, the candidate will receive an email from <a href=mailto:root@apache.org>root@apache.org</a> with the subject <code>Welcome to the Apache Software Foundation</code>. At this point, the candidate needs to follow the steps in the email to set up the Apache account and development environment:</p><ol><li>Reset the password at <a href=https://id.apache.org/reset/enter>https://id.apache.org/reset/enter</a>.</li><li>Configure personal information at <a href=https://whimsy.apache.org/roster/committer/xxx>https://whimsy.apache.org/roster/committer/xxx</a>.</li><li>Associate GitHub account at <a href=https://gitbox.apache.org/boxer>https://gitbox.apache.org/boxer</a>.<ul><li>This step requires configuring GitHub Two-Factor Authentication (2FA).</li></ul></li><li><strong>The nominating PMC member must add the new Committer to the official list of committers via the <a href=https://whimsy.apache.org/roster/ppmc/hugegraph>Roster</a> page.</strong> (<strong>Important</strong>, otherwise repository permissions will not take effect).<ul><li>After this step, the candidate becomes a new Committer and gains write access to the GitHub HugeGraph repository.</li></ul></li><li>(Optional) The new Committer can apply for free use of JetBrains&rsquo; full range of products with their Apache account <a href=https://www.jetbrains.com/shop/eform/apache>here</a>.</li></ol><h2 id=announcing-via-email-announce>Announcing via Email (ANNOUNCE)</h2><p>After the candidate completes the above steps, they will officially become a Committer of HugeGraph. At this point, they need to send an announcement email to <a href=mailto:dev@hugegraph.apache.org>dev@hugegraph.apache.org</a>. Below is a template for the email:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-text data-lang=text><span style=display:flex><span>To: dev@hugegraph.apache.org
</span></span><span style=display:flex><span>Subject: [ANNOUNCE] New Committer: xxx
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Hi everyone, The PPMC for Apache HugeGraph(incubating) has invited xxx to
</span></span><span style=display:flex><span>become a Committer and we are pleased to announce that he/she has accepted.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>xxx is being active in the HugeGraph community &amp; dedicated to ... modules,
</span></span><span style=display:flex><span>and we are glad to see his/her more interactions with the community in the future.
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>(Optional) His/Her GitHub account is https://github.com/xxx
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Welcome xxx, and please enjoy your community journey~
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>Thanks!
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>The Apache HugeGraph PPMC
</span></span></code></pre></div><h1 id=references>References</h1><ol><li><a href=https://community.apache.org/newcommitter.html>https://community.apache.org/newcommitter.html</a> (ASF official documentation)</li><li><a href=https://infra.apache.org/new-committers-guide.html>https://infra.apache.org/new-committers-guide.html</a></li><li><a href=https://www.apache.org/dev/pmc.html#newcommitter>https://www.apache.org/dev/pmc.html#newcommitter</a></li><li><a href=https://linkis.apache.org/zh-CN/community/how-to-vote-a-committer-pmc>https://linkis.apache.org/zh-CN/community/how-to-vote-a-committer-pmc</a></li><li><a href=https://www.apache.org/licenses/contributor-agreements.html#submitting>https://www.apache.org/licenses/contributor-agreements.html#submitting</a></li><li><a href=https://www.apache.org/licenses/cla-faq.html#printer>https://www.apache.org/licenses/cla-faq.html#printer</a></li><li><a href=https://linkis.apache.org/zh-CN/community/how-to-sign-apache-icla>https://linkis.apache.org/zh-CN/community/how-to-sign-apache-icla</a></li><li><a href=https://github.com/apache/hugegraph/issues/1732>https://github.com/apache/hugegraph/issues/1732</a> (HugeGraph ICLA related issue)</li></ol></div><div class=td-content style=page-break-before:always><h1 id=pg-d9ec0777c4f7a8a41476a65f2ecca6f7>10 - CHANGELOGS</h1></div><div class=td-content><h1 id=pg-e45a1f0eaa721babce18f07eaf5fc437>10.1 - HugeGraph 1.0.0 Release Notes</h1><h3 id=oltp-api--client-changes>OLTP API & Client Changes</h3><h4 id=api-changes>API Changes</h4><ul><li>feat(api): support hot set trace through /exception/trace API.</li><li>feat(api): support query by Cypher language.</li><li>feat(api): support swagger UI to viewing API.</li></ul><h4 id=client-changes>Client Changes</h4><ul><li>feat(client) support Cypher query API.</li><li>refact(client): change &rsquo;limit&rsquo; type from long to int.</li><li>feat(client): server bypass for hbase writing (Beta).</li></ul><h3 id=core--server>Core & Server</h3><h4 id=feature-changes>Feature Changes</h4><ul><li>feat: support Java 11.</li><li>feat(core): support adamic-adar & resource-allocation algorithms.</li><li>feat(hbase): support hash rowkey & pre-init tables.</li><li>feat(core): support query by Cypher language.</li><li>feat(core): support automatic management and fail-over for cluster role.</li><li>feat(core): support 16 OLAP algorithms, like: LPA, Louvain, PageRank, BetweennessCentrality, RingsDetect.</li><li>feat: prepare for Apache release.</li></ul><h4 id=bug-fix>Bug Fix</h4><ul><li>fix(core): can&rsquo;t query edges by multi labels + properties.</li><li>fix(core): occasionally NoSuchMethodError Relations().</li><li>fix(core): limit max depth for cycle detection.</li><li>fix(core): traversal contains Tree step has different result.</li><li>fix edge batch update error.</li><li>fix unexpected task status.</li><li>fix(core): edge cache not clear when update or delete associated vertex.</li><li>fix(mysql): run g.V() is error when it&rsquo;s MySQL backend.</li><li>fix: close exception and server-info EXPIRED_INTERVAL.</li><li>fix: export ConditionP.</li><li>fix: query by within + Text.contains.</li><li>fix: schema label race condition of addIndexLabel/removeIndexLabel.</li><li>fix: limit admin role can drop graph.</li><li>fix: ProfileApi url check & add build package to ignore file.</li><li>fix: can&rsquo;t shut down when starting with exception.</li><li>fix: Traversal.graph is empty in StepStrategy.apply() with count().is(0).</li><li>fix: possible extra comma before where statement in MySQL backend.</li><li>fix: JNA UnsatisfiedLinkError for Apple M1.</li><li>fix: start RpcServer NPE & args count of ACTION_CLEARED error & example error.</li><li>fix: rpc server not start.</li><li>fix: User-controlled data in numeric cast & remove word dependency.</li><li>fix: closing iterators on errors for Cassandra & Mysql.</li></ul><h4 id=option-changes>Option Changes</h4><ul><li>move <code>raft.endpoint</code> option from graph scope to server scope.</li></ul><h4 id=other-changes>Other Changes</h4><ul><li>refact(core): enhance schema job module.</li><li>refact(raft): improve raft module & test & install snapshot and add peer.</li><li>refact(core): remove early cycle detection & limit max depth.</li><li>cache: fix assert node.next==empty.</li><li>fix apache license conflicts: jnr-posix and jboss-logging.</li><li>chore: add logo in README & remove outdated log4j version.</li><li>refact(core): improve CachedGraphTransaction perf.</li><li>chore: update CI config & support ci robot & add codeQL SEC-check & graph option.</li><li>refact: ignore security check api & fix some bugs & clean code.</li><li>doc: enhance CONTRIBUTING.md & README.md.</li><li>refact: add checkstyle plugin & clean/format the code.</li><li>refact(core): improve decode string empty bytes & avoid array-construct columns in BackendEntry.</li><li>refact(cassandra): translate ipv4 to ipv6 metrics & update cassandra dependency version.</li><li>chore: use .asf.yaml for apache workflow & replace APPLICATION_JSON with TEXT_PLAIN.</li><li>feat: add system schema store.</li><li>refact(rocksdb): update rocksdb version to 6.22 & improve rocksdb code.</li><li>refact: update mysql scope to test & clean protobuf style/configs.</li><li>chore: upgrade Dockerfile server to 0.12.0 & add editorconfig & improve ci.</li><li>chore: upgrade grpc version.</li><li>feat: support updateIfPresent/updateIfAbsent operation.</li><li>chore: modify abnormal logs & upgrade netty-all to 4.1.44.</li><li>refact: upgrade dependencies & adopt new analyzer & clean code.</li><li>chore: improve .gitignore & update ci configs & add RAT/flatten plugin.</li><li>chore(license): add dependencies-check ci & 3rd-party dependency licenses.</li><li>refact: Shutdown log when shutdown process & fix tx leak & enhance the file path.</li><li>refact: rename package to apache & dependency in all modules (Breaking Change).</li><li>chore: add license checker & update antrun plugin & fix building problem in windows.</li><li>feat: support one-step script for apache release v1.0.0 release.</li></ul><h3 id=computer-olap>Computer (OLAP)</h3><h4 id=algorithm-changes>Algorithm Changes</h4><ul><li>feat: implement page-rank algorithm.</li><li>feat: implement wcc algorithm.</li><li>feat: implement degree centrality.</li><li>feat: implement triangle_count algorithm.</li><li>feat: implement rings-detection algorithm.</li><li>feat: implement LPA algorithm.</li><li>feat: implement kcore algorithm.</li><li>feat: implement closeness centrality algorithm.</li><li>feat: implement betweenness centrality algorithm.</li><li>feat: implement cluster coefficient algorithm.</li></ul><h4 id=platform-changes>Platform Changes</h4><ul><li>feat: init module computer-core & computer-algorithm & etcd dependency.</li><li>feat: add Id as base type of vertex id.</li><li>feat: init Vertex/Edge/Properties & JsonStructGraphOutput.</li><li>feat: load data from hugegraph server.</li><li>feat: init basic combiner, Bsp4Worker, Bsp4Master.</li><li>feat: init sort & transport interface & basic FileInput/Output Stream.</li><li>feat: init computation & ComputerOutput/Driver interface.</li><li>feat: init Partitioner and HashPartitioner</li><li>feat: init Master/WorkerService module.</li><li>feat: init Heap/LoserTree sorting.</li><li>feat: init rpc module.</li><li>feat: init transport server, client, en/decode, flowControl, heartbeat.</li><li>feat: init DataDirManager & PointerCombiner.</li><li>feat: init aggregator module & add copy() and assign() methods to Value class.</li><li>feat: add startAsync and finishAsync on client side, add onStarted and onFinished on server side.</li><li>feat: init store/sort module.</li><li>feat: link managers in worker sending end.</li><li>feat: implement data receiver of worker.</li><li>feat: implement StreamGraphInput and EntryInput.</li><li>feat: add Sender and Receiver to process compute message.</li><li>feat: add seqfile fromat.</li><li>feat: add ComputeManager.</li><li>feat: add computer-k8s and computer-k8s-operator.</li><li>feat: add startup and make docker image code.</li><li>feat: sort different type of message use different combiner.</li><li>feat: add HDFS output format.</li><li>feat: mount config-map and secret to container.</li><li>feat: support java11.</li><li>feat: support partition concurrent compute.</li><li>refact: abstract computer-api from computer-core.</li><li>refact: optimize data receiving.</li><li>fix: release file descriptor after input and compute.</li><li>doc: add operator deploy readme.</li><li>feat: prepare for Apache release.</li></ul><h3 id=toolchain-loader-tools-hubble>Toolchain (loader, tools, hubble)</h3><ul><li>feat(loader): support use SQL to construct graph.</li><li>feat(loader): support Spark-Loader mode(include jdbc source).</li><li>feat(loader): support Flink-CDC mode.</li><li>fix(loader): fix NPE when loading ORC data.</li><li>fix(loader): fix schema is not cached with Spark/Flink mode.</li><li>fix(loader): fix json deserialize error.</li><li>fix(loader): fix jackson conflicts & missing dependencies.</li><li>feat(hubble): supplementary algorithms UI.</li><li>feat(hubble): support highlighting and hints for Gremlin text.</li><li>feat(hubble): add docker-file for hubble.</li><li>feat(hubble): display packaging log output progress while building.</li><li>fix(hubble): fix port-input placeholder UI.</li><li>feat: prepare for Apache release.</li></ul><h3 id=commons-commonrpc>Commons (common,rpc)</h3><ul><li>feat: support assert-throws method returning Future.</li><li>feat: add Cnm and Anm to CollectionUtil.</li><li>feat: support custom content-type.</li><li>feat: prepare for Apache release.</li></ul><h3 id=release-details>Release Details</h3><p>Please check the release details in each repository:</p><ul><li><a href=https://github.com/apache/incubator-hugegraph/releases/tag/1.0.0>Server Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-toolchain/releases/tag/1.0.0>Toolchain Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-computer/releases/tag/1.0.0>Computer Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-commons/releases/tag/1.0.0>Commons Release Notes</a></li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-683dacb0fb9a0e0d70537cae5afdb7cf>10.2 - HugeGraph 1.2.0 Release Notes</h1><h3 id=java-version-statement>Java version statement</h3><blockquote><p>In the future, we will gradually upgrade the java version, <strong>Java 11</strong> -> <strong>Java 17</strong> -> <strong>Java 21</strong>.</p></blockquote><ol><li>hugegraph, hugegraph-toolchain, hugegraph-commons consider use Java 11, also compatible with Java 8 now.</li><li>hugegraph-computer required to use Java 11, <strong>not compatible with Java 8 now!</strong></li></ol><p><strong>v1.2.0 may be the last major version compatible with Java 8</strong>, compatibility with Java 8 will totally end in v1.5 when <a href=https://github.com/apache/incubator-hugegraph/issues/2265>PD/Store</a> merged into master branch (Except for the <code>java-client</code>).</p><h3 id=hugegraph>hugegraph</h3><h4 id=api-changes>API Changes</h4><ul><li>feat(api&core): in oltp apis, add statistics info and support full info about vertices and edges (<a href=https://github.com/apache/incubator-hugegraph/pull/2262>#2262</a>)</li><li>feat(api): support embedded arthas agent in hugegraph-server (<a href=https://github.com/apache/incubator-hugegraph/pull/2278>#2278</a>,<a href=https://github.com/apache/incubator-hugegraph/pull/2337>#2337</a>)</li><li>feat(api): support metric API Prometheus format & add statistic metric api (<a href=https://github.com/apache/incubator-hugegraph/pull/2286>#2286</a>)</li><li>feat(api-core): support label & property filtering for both edge and vertex & support kout dfs mode (<a href=https://github.com/apache/incubator-hugegraph/pull/2295>#2295</a>)</li><li>feat(api): support recording slow query log (<a href=https://github.com/apache/incubator-hugegraph/pull/2327>#2327</a>)</li></ul><h4 id=feature-changes>Feature Changes</h4><ul><li>feat: support task auto manage by server role state machine (<a href=https://github.com/apache/incubator-hugegraph/pull/2130>#2130</a>)</li><li>feat: support parallel compress snapshot (<a href=https://github.com/apache/incubator-hugegraph/pull/2136>#2136</a>)</li><li>feat: use an enhanced CypherAPI to refactor it (<a href=https://github.com/apache/incubator-hugegraph/pull/2143>#2143</a>)</li><li>feat(perf): support JMH benchmark in HG-test module (<a href=https://github.com/apache/incubator-hugegraph/pull/2238>#2238</a>)</li><li>feat: optimising adjacency edge queries (<a href=https://github.com/apache/incubator-hugegraph/pull/2242>#2242</a>)</li><li>Feat: IP white list (<a href=https://github.com/apache/incubator-hugegraph/pull/2299>#2299</a>)</li><li>feat(cassandra): adapt cassandra from 3.11.12 to 4.0.10 (<a href=https://github.com/apache/incubator-hugegraph/pull/2300>#2300</a>)</li><li>feat: support Cassandra with docker-compose in server (<a href=https://github.com/apache/incubator-hugegraph/pull/2307>#2307</a>)</li><li>feat(core): support batch+parallel edges traverse (<a href=https://github.com/apache/incubator-hugegraph/pull/2312>#2312</a>)</li><li>feat: adapt Dockerfile for new project structur (<a href=https://github.com/apache/incubator-hugegraph/pull/2344>#2344</a>)</li><li>feat(server):swagger support auth for standardAuth mode by (<a href=https://github.com/apache/incubator-hugegraph/pull/2360>#2360</a>)</li><li>feat(core): add IntMapByDynamicHash V1 implement (<a href=https://github.com/apache/incubator-hugegraph/pull/2377>#2377</a>)</li></ul><h4 id=bug-fix>Bug Fix</h4><ul><li>fix: transfer add_peer/remove_peer command to leader (<a href=https://github.com/apache/incubator-hugegraph/pull/2112>#2112</a>)</li><li>fix query dirty edges of a vertex with cache (<a href=https://github.com/apache/incubator-hugegraph/pull/2166>#2166</a>)</li><li>fix exception of vertex-drop with index (<a href=https://github.com/apache/incubator-hugegraph/pull/2181>#2181</a>)</li><li>fix: remove dup &lsquo;From&rsquo; in filterExpiredResultFromFromBackend (<a href=https://github.com/apache/incubator-hugegraph/pull/2207>#2207</a>)</li><li>fix: jdbc ssl mode parameter redundant (<a href=https://github.com/apache/incubator-hugegraph/pull/2224>#2224</a>)</li><li>fix: error when start gremlin-console with sample script (<a href=https://github.com/apache/incubator-hugegraph/pull/2231>#2231</a>)</li><li>fix(core): support order by id (<a href=https://github.com/apache/incubator-hugegraph/pull/2233>#2233</a>)</li><li>fix: update ssl_mode value (<a href=https://github.com/apache/incubator-hugegraph/pull/2235>#2235</a>)</li><li>fix: optimizing ClassNotFoundException error message for MYSQL (<a href=https://github.com/apache/incubator-hugegraph/pull/2246>#2246</a>)</li><li>fix: asf invalid notification scheme &lsquo;discussions_status&rsquo; (<a href=https://github.com/apache/incubator-hugegraph/pull/2247>#2247</a>)</li><li>fix: asf invalid notification scheme &lsquo;discussions_comment&rsquo; (<a href=https://github.com/apache/incubator-hugegraph/pull/2250>#2250</a>)</li><li>fix: incorrect use of &lsquo;NO_LIMIT&rsquo; variable (<a href=https://github.com/apache/incubator-hugegraph/pull/2253>#2253</a>)</li><li>fix(core): close flat mapper iterator after usage (<a href=https://github.com/apache/incubator-hugegraph/pull/2281>#2281</a>)</li><li>fix(dist): avoid var PRELOAD cover environmnet vars (<a href=https://github.com/apache/incubator-hugegraph/pull/2302>#2302</a>)</li><li>fix: base-ref/head-ref missed in dependency-review on master (<a href=https://github.com/apache/incubator-hugegraph/pull/2308>#2308</a>)</li><li>fix(core): handle schema Cache expandCapacity concurrent problem (<a href=https://github.com/apache/incubator-hugegraph/pull/2332>#2332</a>)</li><li>fix: in wait-storage.sh, always wait for storage with default rocksdb (<a href=https://github.com/apache/incubator-hugegraph/pull/2333>#2333</a>)</li><li>fix(api): refactor/downgrade record logic for slow log (<a href=https://github.com/apache/incubator-hugegraph/pull/2347>#2347</a>)</li><li>fix(api): clean some code for release (<a href=https://github.com/apache/incubator-hugegraph/pull/2348>#2348</a>)</li><li>fix: remove redirect-to-master from synchronous Gremlin API (<a href=https://github.com/apache/incubator-hugegraph/pull/2356>#2356</a>)</li><li>fix HBase PrefixFilter bug (<a href=https://github.com/apache/incubator-hugegraph/pull/2364>#2364</a>)</li><li>chore: fix curl failed to request https urls (<a href=https://github.com/apache/incubator-hugegraph/pull/2378>#2378</a>)</li><li>fix(api): correct the vertex id in the edge-existence api (<a href=https://github.com/apache/incubator-hugegraph/pull/2380>#2380</a>)</li><li>fix: github action build docker image failed during the release 1.2 process (<a href=https://github.com/apache/incubator-hugegraph/pull/2386>#2386</a>)</li><li>fix: TinkerPop unit test lack some lables (<a href=https://github.com/apache/incubator-hugegraph/pull/2387>#2387</a>)</li></ul><h4 id=option-changes>Option Changes</h4><ul><li>feat(dist): support pre-load test graph data in docker container (<a href=https://github.com/apache/incubator-hugegraph/pull/2241>#2241</a>)</li></ul><h4 id=other-changes>Other Changes</h4><ul><li>refact: use standard UTF-8 charset & enhance CI configs (<a href=https://github.com/apache/incubator-hugegraph/pull/2095>#2095</a>)</li><li>move validate release to hugegraph-doc (<a href=https://github.com/apache/incubator-hugegraph/pull/2109>#2109</a>)</li><li>refact: use a slim way to build docker image on latest code & support zgc (<a href=https://github.com/apache/incubator-hugegraph/pull/2118>#2118</a>)</li><li>chore: remove stage-repo in pom due to release done & update mail rule (<a href=https://github.com/apache/incubator-hugegraph/pull/2128>#2128</a>)</li><li>doc: update issue template & README file (<a href=https://github.com/apache/incubator-hugegraph/pull/2131>#2131</a>)</li><li>chore: cmn algorithm optimization (<a href=https://github.com/apache/incubator-hugegraph/pull/2134>#2134</a>)</li><li>add github token for license check comment (<a href=https://github.com/apache/incubator-hugegraph/pull/2139>#2139</a>)</li><li>chore: disable PR up-to-date in branch (<a href=https://github.com/apache/incubator-hugegraph/pull/2150>#2150</a>)</li><li>refact(core): remove lock of globalMasterInfo to optimize perf (<a href=https://github.com/apache/incubator-hugegraph/pull/2151>#2151</a>)</li><li>chore: async remove left index shouldn&rsquo;t effect query (<a href=https://github.com/apache/incubator-hugegraph/pull/2199>#2199</a>)</li><li>refact(rocksdb): clean & reformat some code (<a href=https://github.com/apache/incubator-hugegraph/pull/2200>#2200</a>)</li><li>refact(core): optimized batch removal of remaining indices consumed by a single consumer (<a href=https://github.com/apache/incubator-hugegraph/pull/2203>#2203</a>)</li><li>add com.janeluo.ikkanalyzer dependency to core model (<a href=https://github.com/apache/incubator-hugegraph/pull/2206>#2206</a>)</li><li>refact(core): early stop unnecessary loops in edge cache (<a href=https://github.com/apache/incubator-hugegraph/pull/2211>#2211</a>)</li><li>doc: update README & add QR code (<a href=https://github.com/apache/incubator-hugegraph/pull/2218>#2218</a>)</li><li>chore: update .asf.yaml for mail rule (<a href=https://github.com/apache/incubator-hugegraph/pull/2221>#2221</a>)</li><li>chore: improve the UI & content in README (<a href=https://github.com/apache/incubator-hugegraph/pull/2227>#2227</a>)</li><li>chore: add pr template (<a href=https://github.com/apache/incubator-hugegraph/pull/2234>#2234</a>)</li><li>doc: modify ASF and remove meaningless CLA (<a href=https://github.com/apache/incubator-hugegraph/pull/2237>#2237</a>)</li><li>chore(dist): replace wget to curl to download swagger-ui (<a href=https://github.com/apache/incubator-hugegraph/pull/2277>#2277</a>)</li><li>Update StandardStateMachineCallback.java (<a href=https://github.com/apache/incubator-hugegraph/pull/2290>#2290</a>)</li><li>doc: update README about start server with example graph (<a href=https://github.com/apache/incubator-hugegraph/pull/2315>#2315</a>)</li><li>README.md tiny improve (<a href=https://github.com/apache/incubator-hugegraph/pull/2320>#2320</a>)</li><li>doc: README.md tiny improve (<a href=https://github.com/apache/incubator-hugegraph/pull/2331>#2331</a>)</li><li>refact: adjust project structure for merge PD & Store[Breaking Change] (<a href=https://github.com/apache/incubator-hugegraph/pull/2338>#2338</a>)</li><li>chore: disable raft test in normal PR due to timeout problem (<a href=https://github.com/apache/incubator-hugegraph/pull/2349>#2349</a>)</li><li>chore(ci): add stage profile settings (<a href=https://github.com/apache/incubator-hugegraph/pull/2361>#2361</a>)</li><li>refact(api): update common 1.2 & fix jersey client code problem (<a href=https://github.com/apache/incubator-hugegraph/pull/2365>#2365</a>)</li><li>chore: move server info into GlobalMasterInfo (<a href=https://github.com/apache/incubator-hugegraph/pull/2370>#2370</a>)</li><li>chore: reset hugegraph version to 1.2.0 (<a href=https://github.com/apache/incubator-hugegraph/pull/2382>#2382</a>)</li></ul><h3 id=hugegraph-computer>hugegraph-computer</h3><h4 id=feature-changes-1>Feature Changes</h4><ul><li>feat: implement fast-failover for MessageRecvManager and DataClientManager (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/243>#243</a>)</li><li>feat: implement parallel send data in load graph step (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/248>#248</a>)</li><li>feat(k8s): init operator project & add webhook (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/259>#259</a>, <a href=https://github.com/apache/incubator-hugegraph-computer/pull/263>#263</a>)</li><li>feat(core): support load vertex/edge snapshot (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/269>#269</a>)</li><li>feat(k8s): Add MinIO as internal(default) storage (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/272>#272</a>)</li><li>feat(algorithm): support random walk in computer (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/274>#274</a>, <a href=https://github.com/apache/incubator-hugegraph-computer/pull/280>#280</a>)</li><li>feat: use &lsquo;foreground&rsquo; delete policy to cancel k8s job (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/290>#290</a>)</li></ul><h4 id=bug-fix-1>Bug Fix</h4><ul><li>fix: superstep not take effect (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/237>#237</a>)</li><li>fix(k8s): modify inconsistent apiGroups (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/270>#270</a>)</li><li>fix(algorithm): record loop is not copied (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/276>#276</a>)</li><li>refact(core): adaptor for common 1.2 & fix a string of possible CI problem (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/286>#286</a>)</li><li>fix: remove okhttp1 due to conflicts risk (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/294>#294</a>)</li><li>fix(core): io.grpc.grpc-core dependency conflic (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/296>#296</a>)</li></ul><h4 id=option-changes-1>Option Changes</h4><ul><li>feat(core): isolate namespace for different input data source (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/252>#252</a>)</li><li>refact(core): support auth config for computer task (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/265>#265</a>)</li></ul><h4 id=other-changes-1>Other Changes</h4><ul><li>remove apache stage repo & update notification rule (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/232>#232</a>)</li><li>chore: fix empty license file (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/233>#233</a>)</li><li>chore: enhance mailbox settings & enable require ci (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/235>#235</a>)</li><li>fix: typo errors in start-computer.sh (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/238>#238</a>)</li><li>[Feature-241] Add PULL_REQUEST_TEMPLATE (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/242>#242</a>, <a href=https://github.com/apache/incubator-hugegraph-computer/pull/257>#257</a>)</li><li>chore: change etcd url only for ci (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/245>#245</a>)</li><li>doc: update readme & add QR code (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/249>#249</a>)</li><li>doc(k8s): add building note for missing classes (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/254>#254</a>)</li><li>chore: reduce mail to dev list (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/255>#255</a>)</li><li>add: dependency-review (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/266>#266</a>)</li><li>chore: correct incorrect comment (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/268>#268</a>)</li><li>refactor(api): ListValue.getFirst() replaces ListValue.get(0) (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/282>#282</a>)</li><li>Improve: Passing workerId to WorkerStat & Skip wait worker close if master executes failed (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/292>#292</a>)</li><li>chore: add check dependencies (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/293>#293</a>)</li><li>chore(license): update license for 1.2.0 (<a href=https://github.com/apache/incubator-hugegraph-computer/pull/299>#299</a>)</li></ul><h3 id=hugegraph-toolchain>hugegraph-toolchain</h3><h4 id=api-changes-1>API Changes</h4><ul><li>feat(client): support edgeExistence api (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/544>#544</a>)</li><li>refact(client): update tests for new OLTP traverser APIs (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/550>#550</a>)</li></ul><h4 id=feature-changes-2>Feature Changes</h4><ul><li>feat(spark): support spark-sink connector for loader (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/497>#497</a>)</li><li>feat(loader): support kafka as datasource (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/506>#506</a>)</li><li>feat(client): support go client for hugegraph (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/514>#514</a>)</li><li>feat(loader): support docker for loader (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/530>#530</a>)</li><li>feat: update common version and remove jersey code (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/538>#538</a>)</li></ul><h4 id=bug-fix-2>Bug Fix</h4><ul><li>fix: convert numbers to strings (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/465>#465</a>)</li><li>fix: hugegraph-spark-loader shell string length limit (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/469>#469</a>)</li><li>fix: spark loader meet Exception: Class is not registered (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/470>#470</a>)</li><li>fix: spark loader Task not serializable (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/471>#471</a>)</li><li>fix: spark with loader has dependency conflicts (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/480>#480</a>)</li><li>fix: spark-loader example schema and struct mismatch (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/504>#504</a>)</li><li>fix(loader): error log (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/499>#499</a>)</li><li>fix: checkstyle && add suppressions.xml (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/500>#500</a>)</li><li>fix(loader): resolve error in loader script (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/510>#510</a>)</li><li>fix: base-ref/head-ref missed in dependency-check-ci on branch push (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/516>#516</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/551>#551</a>)</li><li>fix yarn network connection on linux/arm64 arch (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/519>#519</a>)</li><li>fix(hubble): drop-down box could not display all options (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/535>#535</a>)</li><li>fix(hubble): build with node and yarn (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/543>#543</a>)</li><li>fix(loader): loader options (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/548>#548</a>)</li><li>fix(hubble): parent override children dep version (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/549>#549</a>)</li><li>fix: exclude okhttp1 which has different groupID with okhttp3 (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/555>#555</a>)</li><li>fix: github action build docker image failed (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/556>#556</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/557>#557</a>)</li><li>fix: build error with npm not exist & tiny improve (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/558>#558</a>)</li></ul><h4 id=option-changes-2>Option Changes</h4><ul><li>set default data when create graph (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/447>#447</a>)</li></ul><h4 id=other-changes-2>Other Changes</h4><ul><li>chore: remove apache stage repo & update mail rule (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/433>#433</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/474>#474</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/479>#479</a>)</li><li>refact: clean extra store file in all modules (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/434>#434</a>)</li><li>chore: use fixed node.js version 16 to avoid ci problem (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/437>#437</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/441>#441</a>)</li><li>chore(hubble): use latest code in Dockerfile (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/440>#440</a>)</li><li>chore: remove maven plugin for docker build (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/443>#443</a>)</li><li>chore: improve spark parallel (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/450>#450</a>)</li><li>doc: fix build status badge link (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/455>#455</a>)</li><li>chore: keep hadoop-hdfs-client and hadoop-common version consistent (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/457>#457</a>)</li><li>doc: add basic contact info & QR code in README (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/462>#462</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/475>#475</a>)</li><li>chore: disable PR up-to-date in branch (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/473>#473</a>)</li><li>chore: auto add pr auto label by path (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/466>#466</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/528>#528</a>)</li><li>chore: unify the dependencies versions of the entire project (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/478>#478</a>)</li><li>chore(deps): bump async, semver, word-wrap, browserify-sign in hubble-fe (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/484>#484</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/491>#491</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/494>#494</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/529>#529</a>)</li><li>chore: add pr template (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/498>#498</a>)</li><li>doc(hubble): add docker-compose to start with server (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/522>#522</a>)</li><li>chore(ci): add stage profile settings (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/536>#536</a>)</li><li>chore(client): increase the api num as the latest server commit + 10 (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/546>#546</a>)</li><li>chore(spark): install hugegraph from source (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/552>#552</a>)</li><li>doc: adjust docker related desc in readme (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/559>#559</a>)</li><li>chore(license): update license for 1.2 (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/560>#560</a>, <a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/561>#561</a>)</li></ul><h3 id=hugegraph-commons>hugegraph-commons</h3><h4 id=feature-changes-3>Feature Changes</h4><ul><li>feat(common): replace jersey dependencies with OkHttp (Breaking Change) (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/133>#133</a>)</li></ul><h4 id=bug-fix-3>Bug Fix</h4><ul><li>fix(common): handle spring-boot2/jersey dependency conflicts (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/131>#131</a>)</li><li>fix: Assert.assertThrows() should check result of exceptionConsumer (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/135>#135</a>)</li><li>fix(common): json param convert (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/137>#137</a>)</li></ul><h4 id=other-changes-3>Other Changes</h4><ul><li>refact(common): add more construction methods for convenient (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/132>#132</a>)</li><li>add: dependency-review (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/134>#134</a>)</li><li>refact(common): rename jsonutil to avoid conflicts with server (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/136>#136</a>)</li><li>doc: update README for release (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/138>#138</a>)</li><li>update licence (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/139>#139</a>)</li></ul><h3 id=release-details>Release Details</h3><p>Please check the release details in each repository:</p><ul><li><a href=https://github.com/apache/incubator-hugegraph/releases>Server Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-toolchain/releases>Toolchain Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-computer/releases>Computer Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-commons/releases>Commons Release Notes</a></li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-cc8446bbcef27957e4ec28e70811ad2f>10.3 - HugeGraph 1.3.0 Release Notes</h1><h3 id=operating-environment--version-description>Operating Environment / Version Description</h3><ol><li>consider using Java 11 in <code>hugegraph/toolchain/commons</code>, also compatible with Java 8 now.</li><li><code>hugegraph-computer</code> required to use Java 11, <strong>not compatible with Java 8!</strong></li><li>Using Java8 may loss some security ensured, we recommend using Java 11 in <strong>production env</strong> with <a href=/docs/config/config-authentication/>AuthSystem</a> enabled.</li></ol><p><strong>1.3.0</strong> is the <strong>last major</strong> version compatible with <strong>Java 8</strong>, compatibility with Java 8 will end in
next release(1.5.0) when <a href=https://github.com/apache/hugegraph/issues/2265>PD/Store</a> merged into
master branch (Except for the <code>java-client</code>).</p><p>PS: In the future, we will gradually upgrade the java version from <code>Java 11 -> Java 17 -> Java 21.</code></p><blockquote><p>WIP: this doc is under construction, please wait for the final version (BETA)</p></blockquote><h3 id=hugegraph>hugegraph</h3><blockquote><p>In this version, we have fixed some SEC-related issues. If used in an online service or exposed to
the public, please upgrade to the latest version and enable authorization authentication</p></blockquote><h4 id=api-changes>API Changes</h4><ul><li>feat(api): optimize adjacent-edges query (<a href=https://github.com/apache/incubator-hugegraph/pull/2408>#2408</a>)</li></ul><h4 id=feature-changes>Feature Changes</h4><ul><li>feat: support docker use the auth when starting (<a href=https://github.com/apache/incubator-hugegraph/pull/2403>#2403</a>)</li><li>feat: added the OpenTelemetry trace support (<a href=https://github.com/apache/incubator-hugegraph/pull/2477>#2477</a>)</li></ul><h4 id=bug-fix>Bug Fix</h4><ul><li>fix(core): task restore interrupt problem on restart server (<a href=https://github.com/apache/incubator-hugegraph/pull/2401>#2401</a>)</li><li>fix(server): reinitialize the progress to set up graph auth friendly (<a href=https://github.com/apache/incubator-hugegraph/pull/2411>#2411</a>)</li><li>fix(chore): remove zgc in dockerfile for ARM env (<a href=https://github.com/apache/incubator-hugegraph/pull/2421>#2421</a>)</li><li>fix(server): make CacheManager constructor private to satisfy the singleton pattern (<a href=https://github.com/apache/incubator-hugegraph/pull/2432>#2432</a>)</li><li>fix(server): unify the license headers (<a href=https://github.com/apache/incubator-hugegraph/pull/2438>#2438</a>)</li><li>fix: format and clean code in dist and example modules (<a href=https://github.com/apache/incubator-hugegraph/pull/2441>#2441</a>)</li><li>fix: format and clean code in core module (<a href=https://github.com/apache/incubator-hugegraph/pull/2440>#2440</a>)</li><li>fix: format and clean code in modules (<a href=https://github.com/apache/incubator-hugegraph/pull/2439>#2439</a>)</li><li>fix(server): clean up the code (<a href=https://github.com/apache/incubator-hugegraph/pull/2456>#2456</a>)</li><li>fix(server): remove extra blank lines (<a href=https://github.com/apache/incubator-hugegraph/pull/2459>#2459</a>)</li><li>fix(server): add tip for gremlin api NPE with an empty query (<a href=https://github.com/apache/incubator-hugegraph/pull/2467>#2467</a>)</li><li>fix(server): fix the metric name when promthus collects hugegraph metric, see issue (<a href=https://github.com/apache/incubator-hugegraph/pull/2462>#2462</a>)</li><li>fix(server): <code>serverStarted</code> error when execute gremlin example (<a href=https://github.com/apache/incubator-hugegraph/pull/2473>#2473</a>)</li><li>fix(auth): enhance the URL check (<a href=https://github.com/apache/incubator-hugegraph/pull/2422>#2422</a>)</li></ul><h4 id=option-changes>Option Changes</h4><ul><li>refact(server): enhance the storage path in RocksDB & clean code (<a href=https://github.com/apache/incubator-hugegraph/pull/2491>#2491</a>)</li></ul><h4 id=other-changes>Other Changes</h4><ul><li>chore: add a license link (<a href=https://github.com/apache/incubator-hugegraph/pull/2398>#2398</a>)</li><li>doc: enhance NOTICE info to keep it clear (<a href=https://github.com/apache/incubator-hugegraph/pull/2409>#2409</a>)</li><li>chore(server): update swagger info for default server profile (<a href=https://github.com/apache/incubator-hugegraph/pull/2423>#2423</a>)</li><li>fix(server): unify license header for protobuf file (<a href=https://github.com/apache/incubator-hugegraph/pull/2448>#2448</a>)</li><li>chore: improve license header checker confs and pre-check header when validating (<a href=https://github.com/apache/incubator-hugegraph/pull/2445>#2445</a>)</li><li>chore: unify to call SchemaLabel.getLabelId() (<a href=https://github.com/apache/incubator-hugegraph/pull/2458>#2458</a>)</li><li>chore: refine the hg-style.xml specification (<a href=https://github.com/apache/incubator-hugegraph/pull/2457>#2457</a>)</li><li>chore: Add a newline formatting configuration and a comment for warning (<a href=https://github.com/apache/incubator-hugegraph/pull/2464>#2464</a>)</li><li>chore(server): clear context after req done (<a href=https://github.com/apache/incubator-hugegraph/pull/2470>#2470</a>)</li></ul><h3 id=hugegraph-toolchain>hugegraph-toolchain</h3><h4 id=api-changes-1>API Changes</h4><h4 id=feature-changes-1>Feature Changes</h4><ul><li>fix(loader): update shade plugin for spark loader (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/566>#566</a>)</li><li>fix(hubble): yarn install timeout in arm64 (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/583>#583</a>)</li><li>fix(loader): support file name with prefix for hdfs source (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/571>#571</a>)</li><li>feat(hubble): warp the exception info in HugeClientUtil (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/589>#589</a>)</li></ul><h4 id=bug-fix-1>Bug Fix</h4><ul><li>fix: concurrency issue causing file overwrite due to identical filenames (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/572>#572</a>)</li></ul><h4 id=option-changes-1>Option Changes</h4><ul><li>feat(client): support user defined OKHTTPClient configs (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/590>#590</a>)</li></ul><h4 id=other-changes-1>Other Changes</h4><ul><li>doc: update copyright date(year) in NOTICE (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/567>#567</a>)</li><li>chore(deps): bump ip from 1.1.5 to 1.1.9 in /hugegraph-hubble/hubble-fe (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/580>#580</a>)</li><li>refactor(hubble): enhance maven front plugin (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/568>#568</a>)</li><li>chore(deps): bump es5-ext from 0.10.53 to 0.10.63 in /hugegraph-hubble/hubble-fe (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/582>#582</a>)</li><li>chore(hubble): Enhance code style in hubble (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/592>#592</a>)</li><li>chore: upgrade version to 1.3.0 (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/596>#596</a>)</li><li>chore(ci): update profile commit id for 1.3 (<a href=https://github.com/apache/incubator-hugegraph-toolchain/pull/597>#597</a>)</li></ul><h3 id=hugegraph-commons>hugegraph-commons</h3><h4 id=feature-changes-2>Feature Changes</h4><ul><li>feat: support user defined RestClientConfig/HTTPClient params (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/140>#140</a>)</li></ul><h4 id=bug-fix-2>Bug Fix</h4><h4 id=other-changes-2>Other Changes</h4><ul><li>chore: disable clean flatten for deploy (<a href=https://github.com/apache/incubator-hugegraph-commons/pull/141>#141</a>)</li></ul><h3 id=release-details>Release Details</h3><h3 id=hugegraph-ai>hugegraph-ai</h3><p>This is the first release version of hugegraph-ai, it contains a variety of features, including
an initialized Python client, knowledge graph construction capabilities through LLM, and the integration
of RAG based on HugeGraph.</p><p>It also adds significant functionalities on python-client such as variable APIs,
auth, metric, traverser, and task APIs, as well as interactive and visual demo creation with Gradio.
In addition to these features, the release addresses several bugs and issues, ensuring a more stable
and error-free user experience. Maintenance tasks such as dependency updates, project structure improvements,
and the addition of basic CI further enhance the project&rsquo;s robustness and developer workflow.</p><blockquote><p>This release encapsulates the collaborative efforts of the HugeGraph community, with contributions
from various members, ensuring the project&rsquo;s continuous growth and improvement.</p></blockquote><h4 id=feature-changes-3>Feature Changes</h4><ul><li>feat: initialize hugegraph python client (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/5>#5</a>)</li><li>feat(llm): knowledge graph construction by llm (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/7>#7</a>)</li><li>feat: initialize rag based on HugeGraph (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/20>#20</a>)</li><li>feat(client): add variables api and test (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/24>#24</a>)</li><li>feat: add llm wenxinyiyan & config util & spo_triple_extract (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/27>#27</a>)</li><li>feat: add auth&metric&traverser&task api and ut (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/28>#28</a>)</li><li>feat: refactor construct knowledge graph task (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/29>#29</a>)</li><li>feat: Introduce gradio for creating interactive and visual demo (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/30>#30</a>)</li></ul><h4 id=bug-fix-3>Bug Fix</h4><ul><li>fix: invalid GitHub label (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/3>#3</a>)</li><li>fix: import error (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/13>#13</a>)</li><li>fix: function getEdgeByPage(): the generated query url does not include the parameter page (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/15>#15</a>)</li><li>fix: issue template (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/23>#23</a>)</li><li>fix: base-ref/head-ref missed in dependency-check-ci on branch push (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/25>#25</a>)</li></ul><h4 id=other-changes-3>Other Changes</h4><ul><li>chore: add asf.yaml and ISSUE_TEMPLATE (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/1>#1</a>)</li><li>Bump urllib3 from 2.0.3 to 2.0.7 in /hugegraph-python (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/8>#8</a>)</li><li>chore: create .gitignore file for py (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/9>#9</a>)</li><li>refact: improve project structure & add some basic CI (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/17>#17</a>)</li><li>chore: Update LICENSE and NOTICE (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/31>#31</a>)</li><li>chore: add release scripts (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/33>#33</a>)</li><li>chore: change file chmod 755 (<a href=https://github.com/apache/incubator-hugegraph-ai/pull/34>#34</a>)</li></ul><p>Please check the release details/contributor in each repository:</p><ul><li><a href=https://github.com/apache/incubator-hugegraph/releases>Server Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-toolchain/releases>Toolchain Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-ai/releases>AI Release Notes</a></li><li><a href=https://github.com/apache/incubator-hugegraph-commons/releases>Commons Release Notes</a></li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-01c617939d9e21dc19567e8753d6fd3b>11 -</h1><h2 id=contributor-agreement>Contributor Agreement</h2><h2 id=individual-contributor-exclusive-license-agreement>Individual Contributor exclusive License Agreement</h2><h2 id=including-the-traditional-patent-license-option>(including the TRADITIONAL PATENT LICENSE OPTION)</h2><p>Thank you for your interest in contributing to HugeGraph&rsquo;s all projects (&ldquo;We&rdquo; or &ldquo;Us&rdquo;).</p><p>The purpose of this contributor agreement (&ldquo;Agreement&rdquo;) is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the comment of GitHub CLA-Assistant when submitting a new pull request.</p><h3 id=how-to-use-this-contributor-agreement>How to use this Contributor Agreement</h3><p>If You are an employee and have created the Contribution as part of your employment, You need to have Your employer approve this Agreement or sign the Entity version of this document. If You do not own the Copyright in the entire work of authorship, any other author of the Contribution should also sign this – in any event, please contact Us at <a href=mailto:hugegraph@googlegroups.com>hugegraph@googlegroups.com</a></p><h3 id=1-definitions>1. Definitions</h3><p><strong>&ldquo;You&rdquo;</strong> means the individual Copyright owner who Submits a Contribution to Us.</p><p><strong>&ldquo;Contribution&rdquo;</strong> means any original work of authorship, including any original modifications or additions to an existing work of authorship, Submitted by You to Us, in which You own the Copyright.</p><p><strong>&ldquo;Copyright&rdquo;</strong> means all rights protecting works of authorship, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence.</p><p><strong>&ldquo;Material&rdquo;</strong> means the software or documentation made available by Us to third parties. When this Agreement covers more than one software project, the Material means the software or documentation to which the Contribution was Submitted. After You Submit the Contribution, it may be included in the Material.</p><p><strong>&ldquo;Submit&rdquo;</strong> means any act by which a Contribution is transferred to Us by You by means of tangible or intangible media, including but not limited to electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Us, but excluding any transfer that is conspicuously marked or otherwise designated in writing by You as &ldquo;Not a Contribution.&rdquo;</p><p><strong>&ldquo;Documentation&rdquo;</strong> means any non-software portion of a Contribution.</p><h3 id=2-license-grant>2. License grant</h3><h4 id=21-copyright-license-to-us>2.1 Copyright license to Us</h4><p>Subject to the terms and conditions of this Agreement, You hereby grant to Us a worldwide, royalty-free, Exclusive, perpetual and irrevocable (except as stated in Section 8.2) license, with the right to transfer an unlimited number of non-exclusive licenses or to grant sublicenses to third parties, under the Copyright covering the Contribution to use the Contribution by all means, including, but not limited to:</p><ul><li>publish the Contribution,</li><li>modify the Contribution,</li><li>prepare derivative works based upon or containing the Contribution and/or to combine the Contribution with other Materials,</li><li>reproduce the Contribution in original or modified form,</li><li>distribute, to make the Contribution available to the public, display and publicly perform the Contribution in original or modified form.</li></ul><h4 id=22-moral-rights>2.2 Moral rights</h4><p>Moral Rights remain unaffected to the extent they are recognized and not waivable by applicable law. Notwithstanding, You may add your name to the attribution mechanism customary used in the Materials you Contribute to, such as the header of the source code files of Your Contribution, and We will respect this attribution when using Your Contribution.</p><h4 id=23-copyright-license-back-to-you>2.3 Copyright license back to You</h4><p>Upon such grant of rights to Us, We immediately grant to You a worldwide, royalty-free, non-exclusive, perpetual and irrevocable license, with the right to transfer an unlimited number of non-exclusive licenses or to grant sublicenses to third parties, under the Copyright covering the Contribution to use the Contribution by all means, including, but not limited to:</p><ul><li>publish the Contribution,</li><li>modify the Contribution,</li><li>prepare derivative works based upon or containing the Contribution and/or to combine the Contribution with other Materials,</li><li>reproduce the Contribution in original or modified form,</li><li>distribute, to make the Contribution available to the public, display and publicly perform the Contribution in original or modified form.</li></ul><p>This license back is limited to the Contribution and does not provide any rights to the Material.</p><h3 id=3-patents>3. Patents</h3><h4 id=31-patent-license>3.1 Patent license</h4><p>Subject to the terms and conditions of this Agreement You hereby grant to Us and to recipients of Materials distributed by Us a worldwide, royalty-free, non-exclusive, perpetual and irrevocable (except as stated in Section 3.2) patent license, with the right to transfer an unlimited number of non-exclusive licenses or to grant sublicenses to third parties, to make, have made, use, sell, offer for sale, import and otherwise transfer the Contribution and the Contribution in combination with any Material (and portions of such combination). This license applies to all patents owned or controlled by You, whether already acquired or hereafter acquired, that would be infringed by making, having made, using, selling, offering for sale, importing or otherwise transferring of Your Contribution(s) alone or by combination of Your Contribution(s) with any Material.</p><h4 id=32-revocation-of-patent-license>3.2 Revocation of patent license</h4><p>You reserve the right to revoke the patent license stated in section 3.1 if We make any infringement claim that is targeted at your Contribution and not asserted for a Defensive Purpose. An assertion of claims of the Patents shall be considered for a &ldquo;Defensive Purpose&rdquo; if the claims are asserted against an entity that has filed, maintained, threatened, or voluntarily participated in a patent infringement lawsuit against Us or any of Our licensees.</p><h3 id=4-license-obligations-by-us>4. License obligations by Us</h3><p>We agree to (sub)license the Contribution or any Materials containing, based on or derived from your Contribution under the terms of any licenses the Free Software Foundation classifies as Free Software License and which are approved by the Open Source Initiative as Open Source licenses.</p><p>More specifically and in strict accordance with the above paragraph, we agree to (sub)license the Contribution or any Materials containing, based on or derived from the Contribution only in accordance with our licensing policy available at: <a href=http://www.apache.org/licenses/LICENSE-2.0>http://www.apache.org/licenses/LICENSE-2.0</a>.</p><p>In addition, We may use the following licenses for Documentation in the Contribution: GFDL-1.2 (including any right to adopt any future version of a license).</p><p>We agree to license patents owned or controlled by You only to the extent necessary to (sub)license Your Contribution(s) and the combination of Your Contribution(s) with the Material under the terms of any licenses the Free Software Foundation classifies as Free Software licenses and which are approved by the Open Source Initiative as Open Source licenses..</p><h3 id=5-disclaimer>5. Disclaimer</h3><p>THE CONTRIBUTION IS PROVIDED &ldquo;AS IS&rdquo;. MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US AND BY US TO YOU. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION AND EXTENT TO THE MINIMUM PERIOD AND EXTENT PERMITTED BY LAW.</p><h3 id=6-consequential-damage-waiver>6. Consequential damage waiver</h3><p>TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU OR WE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.</p><h3 id=7-approximation-of-disclaimer-and-damage-waiver>7. Approximation of disclaimer and damage waiver</h3><p>IF THE DISCLAIMER AND DAMAGE WAIVER MENTIONED IN SECTION 5. AND SECTION 6. CANNOT BE GIVEN LEGAL EFFECT UNDER APPLICABLE LOCAL LAW, REVIEWING COURTS SHALL APPLY LOCAL LAW THAT MOST CLOSELY APPROXIMATES AN ABSOLUTE WAIVER OF ALL CIVIL OR CONTRACTUAL LIABILITY IN CONNECTION WITH THE CONTRIBUTION.</p><h3 id=8-term>8. Term</h3><p>8.1 This Agreement shall come into effect upon Your acceptance of the terms and conditions.</p><p>8.2 This Agreement shall apply for the term of the copyright and patents licensed here. However, You shall have the right to terminate the Agreement if We do not fulfill the obligations as set forth in Section 4. Such termination must be made in writing.</p><p>8.3 In the event of a termination of this Agreement Sections 5, 6, 7, 8 and 9 shall survive such termination and shall remain in full force thereafter. For the avoidance of doubt, Free and Open Source Software (sub)licenses that have already been granted for Contributions at the date of the termination shall remain in full force after the termination of this Agreement.</p><h3 id=9-miscellaneous>9 Miscellaneous</h3><p>9.1 This Agreement and all disputes, claims, actions, suits or other proceedings arising out of this agreement or relating in any way to it shall be governed by the laws of China excluding its private international law provisions.</p><p>9.2 This Agreement sets out the entire agreement between You and Us for Your Contributions to Us and overrides all other agreements or understandings.</p><p>9.3 In case of Your death, this agreement shall continue with Your heirs. In case of more than one heir, all heirs must exercise their rights through a commonly authorized person.</p><p>9.4 If any provision of this Agreement is found void and unenforceable, such provision will be replaced to the extent possible with a provision that comes closest to the meaning of the original provision and that is enforceable. The terms and conditions set forth in this Agreement shall apply notwithstanding any failure of essential purpose of this Agreement or any limited remedy to the maximum extent possible under law.</p><p>9.5 You agree to notify Us of any facts or circumstances of which you become aware that would make this Agreement inaccurate in any respect.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-a395eab4dc054c73b0174216cfbeaf1a>12 -</h1><h1 id=hugegraph-docs>HugeGraph Docs</h1><ul><li><a href=download.md>Download</a></li></ul><h2 id=quickstart>Quickstart</h2><ul><li><a href=quickstart/hugegraph-server.md>Install HugeGraph-Server</a></li><li><a href=quickstart/hugegraph-loader.md>Load data with HugeGraph-Loader</a></li><li><a href=quickstart/hugegraph-hubble.md>Visual with HugeGraph-Hubble</a></li><li><a href=quickstart/hugegraph-client.md>Develop with HugeGraph-Client</a></li><li><a href=quickstart/hugegraph-tools.md>Manage with HugeGraph-Tools</a></li><li><a href=quickstart/hugegraph-computer.md>Analysis with HugeGraph-Computer</a></li><li><a href=quickstart/hugegraph-studio.md>Display with HugeGraph-Studio</a></li></ul><h2 id=config>Config</h2><ul><li><a href=config/config-guide.md>Config Guide</a></li><li><a href=config/config-option.md>Config Options</a></li><li><a href=config/config-authentication.md>Config Authentication</a></li><li><a href=config/config-https.md>Config HTTPS</a></li><li><a href=config/config-computer.md>Config Computer</a></li></ul><h2 id=api>API</h2><ul><li><a href=clients/hugegraph-api.md>RESTful API</a><ul><li><a href=clients/restful-api/schema.md>Schema</a></li><li><a href=clients/restful-api/propertykey.md>PropertyKey</a></li><li><a href=clients/restful-api/vertexlabel.md>VertexLabel</a></li><li><a href=clients/restful-api/edgelabel.md>EdgeLabel</a></li><li><a href=clients/restful-api/indexlabel.md>IndexLabel</a></li><li><a href=clients/restful-api/rebuild.md>Rebuild</a></li><li><a href=clients/restful-api/vertex.md>Vertex</a></li><li><a href=clients/restful-api/edge.md>Edge</a></li><li><a href=clients/restful-api/traverser.md>Traverser</a></li><li><a href=clients/restful-api/rank.md>Rank</a></li><li><a href=clients/restful-api/variable.md>Variable</a></li><li><a href=clients/restful-api/graphs.md>Graphs</a></li><li><a href=clients/restful-api/task.md>Task</a></li><li><a href=clients/restful-api/gremlin.md>Gremlin</a></li><li><a href=clients/restful-api/cypher.md>Cypher</a></li><li><a href=clients/restful-api/auth.md>Authentication</a></li><li><a href=clients/restful-api/other.md>Other</a></li></ul></li><li><a href=clients/hugegraph-client.md>Java Client</a></li><li><a href=clients/gremlin-console.md>Gremlin Console</a></li></ul><h2 id=guides>Guides</h2><ul><li><a href=guides/architectural.md>Architecture Overview</a></li><li><a href=guides/desgin-concept.md>Design Concepts</a></li><li><a href=guides/custom-plugin.md>Custom Plugins</a></li><li><a href=guides/backup-restore.md>Backup Restore</a></li><li><a href=guides/faq.md>FAQ</a></li></ul><h2 id=query-language>Query Language</h2><ul><li><a href=language/hugegraph-gremlin.md>Gremlin Query Language</a></li><li><a href=language/hugegraph-example.md>HugeGraph Examples</a></li></ul><h2 id=performance>Performance</h2><ul><li><a href=performance/hugegraph-benchmark-0.5.6.md>HugeGraph Benchmark Performance</a></li><li><a href=content/cn/docs/performance/api-preformance/_index.md>HugeGraph API Performance—Outdated</a><ul><li><a href=content/cn/docs/performance/api-preformance/hugegraph-api-0.5.6-RocksDB.md>v0.5.6 Stand-alone(RocksDB)</a></li><li><a href=content/cn/docs/performance/api-preformance/hugegraph-api-0.5.6-Cassandra.md>v0.5.6 Cluster(Cassandra)</a></li><li><a href=content/cn/docs/performance/api-preformance/hugegraph-api-0.4.4.md>v0.4.4</a></li><li><a href=content/cn/docs/performance/api-preformance/hugegraph-api-0.2.md>v0.2</a></li></ul></li><li><a href=performance/hugegraph-loader-performance.md>HugeGraph-Loader Performance</a></li></ul><h2 id=changelogs>ChangeLogs</h2><ul><li><a href=changelog/hugegraph-1.3.0-release-notes.md>Release-1.3.0</a></li><li><a href=changelog/hugegraph-1.2.0-release-notes.md>Release-1.2.0</a></li><li><a href=changelog/hugegraph-1.0.0-release-notes.md>Release-1.0.0</a></li><li><a href=changelog/hugegraph-0.12.0-release-notes.md>Release-0.12.0</a></li></ul></div></main></div></div><footer class="bg-dark py-3 row d-print-none"><div class=footer-container><div class="row bg-dark"><div class=col-1></div><div class="col-4 text-center container-center"><div class=footer-row><a href=https://www.apache.org><div class=footer-apache-logo><svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 7127.6 2890" enable-background="new 0 0 7127.6 2890"><path fill="#6d6e71" d="M7104.7 847.8c15.3 15.3 22.9 33.7 22.9 55.2s-7.6 39.9-22.9 55.4c-15.3 15.4-33.8 23.1-55.6 23.1s-40.2-7.6-55.4-22.9c-15.1-15.3-22.7-33.7-22.7-55.2s7.6-39.9 22.9-55.4c15.3-15.4 33.7-23.1 55.4-23.1C7070.9 824.9 7089.4 832.5 7104.7 847.8zM7098.1 951.9c13.3-13.6 20-29.8 20-48.7s-6.6-35-19.8-48.5c-13.2-13.4-29.4-20.1-48.6-20.1-19.2.0-35.4 6.7-48.7 20.2s-19.9 29.7-19.9 48.7 6.6 35.2 19.7 48.6c13.1 13.4 29.3 20.1 48.5 20.1S7084.7 965.4 7098.1 951.9zm-11-63.8c0 14-6.1 22.8-18.4 26.4l22.5 30.5H7073l-20.3-28.3h-18.6V945h-14.7v-84.6h31.8c12.8.0 22 2.2 27.6 6.6C7084.4 871.4 7087.1 878.4 7087.1 888.1zM7068.2 9e2c3-2.4 4.4-6.5 4.4-12s-1.5-9.4-4.5-11.6-8.4-3.2-16-3.2h-18v30.5h17.5C7059.7 903.6 7065.3 902.4 7068.2 9e2z"/><path fill="#6d6e71" d="M1803.6 499.8v155.4h-20V499.8h-56.8v-19.2h133.9v19.2H1803.6z"/><path fill="#6d6e71" d="M2082.2 655.2v-76.9H1977v76.9h-20V480.5h20v78.9h105.2v-78.9h20v174.7h-20z"/><path fill="#6d6e71" d="M2241.4 499.8v57.4h88.1v19.2h-88.1v59.8h101.8v19h-121.8V480.5H2340v19.2H2241.4z"/><path fill="#d22128" d="M1574.5 1852.4l417.3-997.6h80.1l417.3 997.6h-105.4l-129.3-311.9h-448.2l-127.9 311.9H1574.5zM2032.6 970l-205.1 493.2h404.7L2032.6 970z"/><path fill="#d22128" d="M2596.9 1852.4V854.8H3010c171.4.0 295.1 158.8 295.1 313.3.0 163-115.2 316.1-286.6 316.1h-324.6v368.1h-97zm97-455.3h318.9c118 0 193.9-108.2 193.9-229 0-125.1-92.7-226.2-202.3-226.2h-310.5v455.2z"/><path fill="#d22128" d="M3250.5 1852.4l417.3-997.6h80.1l417.3 997.6h-105.4l-129.3-311.9h-448.2l-127.9 311.9H3250.5zM3708.6 970l-205.1 493.2h404.7L3708.6 970z"/><path fill="#d22128" d="M4637.3 849.1c177 0 306.3 89.9 368.1 217.8l-78.7 47.8c-63.2-132.1-186.9-177-295.1-177-238.9.0-369.5 213.6-369.5 414.5.0 220.6 161.6 420.1 373.7 420.1 112.4.0 244.5-56.2 307.7-185.5l81.5 42.1c-64.6 148.9-241.7 231.8-394.8 231.8-274 0-466.5-261.3-466.5-514.2C4163.8 1106.3 4336.6 849.1 4637.3 849.1z"/><path fill="#d22128" d="M5949.1 854.8v997.6h-98.4v-466.5h-591.5v466.5h-96.9V854.8h96.9v444h591.5v-444H5949.1z"/><path fill="#d22128" d="M6844.6 1765.2v87.1h-670.2V854.8H6832v87.1h-560.6v359.7h489v82.9h-489v380.8H6844.6z"/><path fill="#6d6e71" d="M1667.6 2063.6c11.8 3.5 22.2 8.3 31 14.2l-10.3 22.6c-9-6-18.6-10.4-28.9-13.4-10.2-2.9-20-4.4-29.2-4.4-13.6.0-24.5 2.4-32.6 7.3s-12.2 11.8-12.2 20.7c0 7.6 2.3 14 6.8 19s10.2 8.9 17 11.7c6.8 2.8 16.1 6 28 9.6 14.4 4.6 26 8.9 34.7 12.9 8.8 4 16.3 9.9 22.5 17.8 6.2 7.8 9.3 18.2 9.3 31 0 11.7-3.2 21.8-9.5 30.6-6.3 8.7-15.3 15.5-26.8 20.3-11.6 4.8-24.9 7.2-40 7.2s-29.7-2.9-43.9-8.7c-14.2-5.8-26.4-13.6-36.6-23.4l10.7-21.6c9.6 9.4 20.7 16.7 33.3 21.9 12.6 5.2 24.8 7.8 36.8 7.8 15.3.0 27.3-3 36.1-8.9s13.2-13.9 13.2-23.9c0-7.8-2.3-14.3-6.9-19.4-4.6-5.1-10.3-9-17.1-11.9-6.8-2.8-16.1-6-28-9.6-14.2-4.2-25.7-8.3-34.6-12.2-8.9-3.9-16.4-9.7-22.5-17.5-6.1-7.7-9.2-17.9-9.2-30.6.0-10.9 3-20.4 9-28.6s14.6-14.6 25.6-19.1c11.1-4.5 23.8-6.8 38.2-6.8C1643.8 2058.3 1655.7 2060.1 1667.6 2063.6z"/><path fill="#6d6e71" d="M1980.1 2072.8c16.8 9.4 30.2 22.3 40 38.4 9.8 16.2 14.8 33.9 14.8 53.3.0 19.5-4.9 37.4-14.8 53.6-9.8 16.3-23.2 29.1-40 38.6s-35.3 14.3-55.2 14.3c-20.3.0-38.8-4.7-55.7-14.3-16.8-9.5-30.2-22.4-40-38.6-9.8-16.3-14.8-34.1-14.8-53.6s4.9-37.3 14.8-53.5c9.8-16.2 23.2-29 40-38.3 16.8-9.4 35.4-14 55.7-14C1944.8 2058.6 1963.2 2063.3 1980.1 2072.8zM1881.9 2092.7c-13.1 7.4-23.6 17.5-31.4 30.1-7.8 12.6-11.8 26.5-11.8 41.7.0 15.3 3.9 29.3 11.8 42 7.8 12.7 18.3 22.8 31.4 30.2 13.1 7.4 27.4 11.1 42.9 11.1s29.7-3.7 42.7-11.1 23.3-17.4 31.1-30.2c7.7-12.7 11.6-26.7 11.6-42s-3.9-29.2-11.6-41.8c-7.7-12.6-18.1-22.6-31.1-30s-27.2-11.2-42.6-11.2C1909.4 2081.5 1895.1 2085.2 1881.9 2092.7z"/><path fill="#6d6e71" d="M2186.5 2082.4v74h98.4v23.2h-98.4v90.2h-24.1v-210.6h133.8v23.2H2186.5z"/><path fill="#6d6e71" d="M2491.6 2082.4v187.4h-24.1v-187.4h-68.4v-23.2h161.4v23.2H2491.6z"/><path fill="#6d6e71" d="M2871.8 2269.8l-56.8-177.4-57.6 177.4h-24.5l-70.5-210.6h25.9l57.9 182.7 57.1-182.4 24.1-.3 57.7 182.7 57.1-182.7h25l-70.6 210.6H2871.8z"/><path fill="#6d6e71" d="M3087.3 2216.6l-23.5 53.2h-25.6l94.4-210.6h25l94.1 210.6h-26.1l-23.5-53.2H3087.3zM3144.5 2086.6l-46.9 106.8h94.4l-47.5-106.8z"/><path fill="#6d6e71" d="M3461.1 2202.7c-6 .4-10.7.6-14.1.6h-56v66.5h-24v-210.6h80c26.2.0 46.6 6.2 61.2 18.5 14.5 12.3 21.8 29.8 21.8 52.3.0 17.2-4.1 31.7-12.2 43.3-8.1 11.6-19.8 20-35 25l49.2 71.5h-27.3L3461.1 2202.7zM3491.3 2167.6c10.3-8.4 15.5-20.8 15.5-37 0-15.9-5.2-27.9-15.5-36s-25.1-12.2-44.3-12.2h-56v97.8h56C3466.2 2180.2 3481 2176 3491.3 2167.6z"/><path fill="#6d6e71" d="M3688.3 2082.4v69.2h106.2v23.2h-106.2v72.1h122.8v22.9h-146.9v-210.6h142.9v23.2H3688.3z"/><path fill="#6d6e71" d="M4147 2082.4v74h98.4v23.2H4147v90.2h-24.1v-210.6h133.8v23.2H4147z"/><path fill="#6d6e71" d="M4523.3 2072.8c16.8 9.4 30.2 22.3 40 38.4 9.8 16.2 14.8 33.9 14.8 53.3.0 19.5-4.9 37.4-14.8 53.6-9.8 16.3-23.2 29.1-40 38.6s-35.3 14.3-55.2 14.3c-20.3.0-38.8-4.7-55.7-14.3-16.8-9.5-30.2-22.4-40-38.6-9.8-16.3-14.8-34.1-14.8-53.6s4.9-37.3 14.8-53.5c9.8-16.2 23.2-29 40-38.3 16.8-9.4 35.4-14 55.7-14C4488.1 2058.6 4506.5 2063.3 4523.3 2072.8zM4425.2 2092.7c-13.1 7.4-23.6 17.5-31.4 30.1-7.8 12.6-11.8 26.5-11.8 41.7.0 15.3 3.9 29.3 11.8 42 7.8 12.7 18.3 22.8 31.4 30.2 13.1 7.4 27.4 11.1 42.9 11.1s29.7-3.7 42.7-11.1 23.3-17.4 31.1-30.2c7.7-12.7 11.6-26.7 11.6-42s-3.9-29.2-11.6-41.8c-7.7-12.6-18.1-22.6-31.1-30s-27.2-11.2-42.6-11.2C4452.6 2081.5 4438.3 2085.2 4425.2 2092.7z"/><path fill="#6d6e71" d="M4854.7 2247.7c-15.7 15.5-37.3 23.3-64.8 23.3-27.7.0-49.4-7.8-65.1-23.3-15.7-15.5-23.6-37-23.6-64.6v-124h24.1v124c0 20.3 5.8 36.1 17.3 47.5 11.6 11.4 27.3 17.1 47.3 17.1 20.1.0 35.8-5.7 47.1-17 11.4-11.3 17-27.2 17-47.7v-124h24.1v124C4878.2 2210.7 4870.4 2232.2 4854.7 2247.7z"/><path fill="#6d6e71" d="M5169.5 2269.8l-126.3-169.1v169.1h-24.1v-210.6h25l126.3 169.3v-169.3h23.8v210.6H5169.5z"/><path fill="#6d6e71" d="M5478.4 2073.1c16.4 9.3 29.4 21.9 38.9 37.9 9.6 16 14.3 33.9 14.3 53.5s-4.8 37.6-14.3 53.6c-9.5 16.1-22.6 28.7-39.3 37.9-16.6 9.2-35.2 13.8-55.5 13.8h-84.3v-210.6h85.2C5443.7 2059.2 5462 2063.8 5478.4 2073.1zM5362.3 2246.9h61.4c15.5.0 29.6-3.5 42.3-10.6s22.8-16.9 30.2-29.5c7.4-12.5 11.1-26.5 11.1-42s-3.8-29.4-11.3-41.9-17.7-22.3-30.6-29.6c-12.8-7.2-27-10.9-42.6-10.9h-60.5v164.5z"/><path fill="#6d6e71" d="M5668.6 2216.6l-23.5 53.2h-25.6l94.4-210.6h25l94.1 210.6h-26l-23.5-53.2H5668.6zM5725.8 2086.6l-46.9 106.8h94.4l-47.5-106.8z"/><path fill="#6d6e71" d="M5991 2082.4v187.4h-24v-187.4h-68.4v-23.2H6060v23.2h-69z"/><path fill="#6d6e71" d="M6175.9 2269.8v-210.6h24.1v210.6H6175.9z"/><path fill="#6d6e71" d="M6493.7 2072.8c16.8 9.4 30.2 22.3 40 38.4 9.8 16.2 14.8 33.9 14.8 53.3.0 19.5-4.9 37.4-14.8 53.6-9.8 16.3-23.2 29.1-40 38.6s-35.3 14.3-55.2 14.3c-20.3.0-38.8-4.7-55.7-14.3-16.8-9.5-30.2-22.4-40-38.6-9.8-16.3-14.8-34.1-14.8-53.6s4.9-37.3 14.8-53.5c9.8-16.2 23.2-29 40-38.3 16.8-9.4 35.4-14 55.7-14C6458.5 2058.6 6476.9 2063.3 6493.7 2072.8zM6395.6 2092.7c-13.1 7.4-23.6 17.5-31.4 30.1-7.8 12.6-11.8 26.5-11.8 41.7.0 15.3 3.9 29.3 11.8 42 7.8 12.7 18.3 22.8 31.4 30.2 13.1 7.4 27.4 11.1 42.9 11.1s29.7-3.7 42.7-11.1 23.3-17.4 31.1-30.2c7.7-12.7 11.6-26.7 11.6-42s-3.9-29.2-11.6-41.8c-7.7-12.6-18.1-22.6-31.1-30s-27.2-11.2-42.6-11.2C6423 2081.5 6408.8 2085.2 6395.6 2092.7z"/><path fill="#6d6e71" d="M6826.5 2269.8l-126.3-169.1v169.1h-24.1v-210.6h25l126.3 169.3v-169.3h23.8v210.6H6826.5z"/><linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-4516.6152" y1="-2338.7222" x2="-4108.4111" y2="-1861.3982" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset="0" style="stop-color:#F69923"/><stop offset=".3123" style="stop-color:#F79A23"/><stop offset=".8383" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_1_)" d="M1230.1 13.7c-45.3 26.8-120.6 102.5-210.5 212.3l82.6 155.9c58-82.9 116.9-157.5 176.3-221.2 4.6-5.1 7-7.5 7-7.5-2.3 2.5-4.6 5-7 7.5-19.2 21.2-77.5 89.2-165.5 224.4 84.7-4.2 214.9-21.6 321.1-39.7 31.6-177-31-258-31-258S1323.4-41.4 1230.1 13.7z"/><path fill="none" d="M1090.2 903.1c.6-.1 1.2-.2 1.8-.3l-11.9 1.3c-.7.3-1.4.7-2.1 1C1082.1 904.4 1086.2 903.7 1090.2 903.1z"/><path fill="none" d="M1005.9 1182.3c-6.7 1.5-13.7 2.7-20.7 3.7C992.3 1185 999.2 1183.8 1005.9 1182.3z"/><path fill="none" d="M432.9 1808.8c.9-2.3 1.8-4.7 2.6-7 18.2-48 36.2-94.7 54-140.1 20-51 39.8-100.4 59.3-148.3 20.6-50.4 40.9-99.2 60.9-146.3 21-49.4 41.7-97 62-142.8 16.5-37.3 32.8-73.4 48.9-108.3 5.4-11.7 10.7-23.2 16-34.6 10.5-22.7 21-44.8 31.3-66.5 9.5-20 19-39.6 28.3-58.8 3.1-6.4 6.2-12.8 9.3-19.1.5-1 1-2 1.5-3.1l-10.2 1.1-8-15.9c-.8 1.6-1.6 3.1-2.4 4.6-14.5 28.8-28.9 57.9-43.1 87.2-8.2 16.9-16.4 34-24.6 51-22.6 47.4-44.8 95.2-66.6 143.3-22.1 48.6-43.7 97.5-64.9 146.5-20.8 48.1-41.3 96.2-61.2 144.2-20 48-39.5 95.7-58.5 143.2-19.9 49.5-39.2 98.7-58 147.2-4.2 10.9-8.5 21.9-12.7 32.8-15 39.2-29.7 77.8-44 116l12.7 25.1 11.4-1.2c.4-1.1.8-2.3 1.3-3.4C396.7 1905.4 414.9 1856.4 432.9 1808.8z"/><path fill="none" d="M980 1186.8c.1.0.1.0.1-.1C980.1 1186.8 980.1 1186.8 980 1186.8z"/><path fill="#be202e" d="M952.6 1323c-10.6 1.9-21.4 3.8-32.5 5.7-.1.0-.1.1-.2.1 5.6-.8 11.2-1.7 16.6-2.6C942 1325.2 947.3 1324.1 952.6 1323z"/><path opacity=".35" fill="#be202e" d="M952.6 1323c-10.6 1.9-21.4 3.8-32.5 5.7-.1.0-.1.1-.2.1 5.6-.8 11.2-1.7 16.6-2.6C942 1325.2 947.3 1324.1 952.6 1323z"/><path fill="#be202e" d="M980.3 1186.7C980.2 1186.7 980.2 1186.7 980.3 1186.7c-.1.1-.2.1-.2.1 1.8-.2 3.5-.5 5.2-.8 7-1 13.9-2.2 20.7-3.7C997.5 1183.8 989 1185.2 980.3 1186.7z"/><path opacity=".35" fill="#be202e" d="M980.3 1186.7C980.2 1186.7 980.2 1186.7 980.3 1186.7c-.1.1-.2.1-.2.1 1.8-.2 3.5-.5 5.2-.8 7-1 13.9-2.2 20.7-3.7C997.5 1183.8 989 1185.2 980.3 1186.7z"/><linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-7537.7339" y1="-2391.4075" x2="-4625.4141" y2="-2391.4075" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset=".3233" style="stop-color:#9E2064"/><stop offset=".6302" style="stop-color:#C92037"/><stop offset=".7514" style="stop-color:#CD2335"/><stop offset="1" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_2_)" d="M858.6 784.7c25.1-46.9 50.5-92.8 76.2-137.4 26.7-46.4 53.7-91.3 80.9-134.7 1.6-2.6 3.2-5.2 4.8-7.7 27-42.7 54.2-83.7 81.6-122.9L1019.5 226c-6.2 7.6-12.5 15.3-18.8 23.2-23.8 29.7-48.6 61.6-73.9 95.5-28.6 38.2-58 78.9-87.8 121.7-27.6 39.5-55.5 80.9-83.5 123.7-23.8 36.5-47.7 74-71.4 112.5-.9 1.4-1.8 2.9-2.6 4.3L789 919.2c22.8-45.6 46.1-90.5 69.6-134.5z"/><linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-7186.1777" y1="-2099.3059" x2="-5450.7183" y2="-2099.3059" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset="0" style="stop-color:#282662"/><stop offset=".0954839" style="stop-color:#662E8D"/><stop offset=".7882" style="stop-color:#9F2064"/><stop offset=".9487" style="stop-color:#CD2032"/></linearGradient><path fill="url(#SVGID_3_)" d="M369 1981c-14.2 39.1-28.5 78.9-42.9 119.6-.2.6-.4 1.2-.6 1.8-2 5.7-4.1 11.5-6.1 17.2-9.7 27.4-18 52.1-37.3 108.2 31.7 14.5 57.1 52.5 81.1 95.6-2.6-44.7-21-86.6-56.2-119.1 156.1 7 290.6-32.4 360.1-146.6 6.2-10.2 11.9-20.9 17-32.2-31.6 40.1-70.8 57.1-144.5 53-.2.1-.3.1-.5.2.2-.1.3-.1.5-.2 108.6-48.6 163.1-95.3 211.2-172.6 11.4-18.3 22.5-38.4 33.8-60.6-94.9 97.5-205 125.3-320.9 104.2l-86.9 9.5C374.4 1966.3 371.7 1973.6 369 1981z"/><linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-7374.1626" y1="-2418.5454" x2="-4461.8428" y2="-2418.5454" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset=".3233" style="stop-color:#9E2064"/><stop offset=".6302" style="stop-color:#C92037"/><stop offset=".7514" style="stop-color:#CD2335"/><stop offset="1" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_4_)" d="M409.6 1786.3c18.8-48.5 38.1-97.7 58-147.2 19-47.4 38.5-95.2 58.5-143.2s40.4-96.1 61.2-144.2c21.2-49 42.9-97.8 64.9-146.5 21.8-48.1 44-95.9 66.6-143.3 8.1-17.1 16.3-34.1 24.6-51 14.2-29.3 28.6-58.4 43.1-87.2.8-1.6 1.6-3.1 2.4-4.6L681.4 706.8c-1.8 2.9-3.5 5.8-5.3 8.6-25.1 40.9-50 82.7-74.4 125.4-24.7 43.1-49 87.1-72.7 131.7-20 37.6-39.6 75.6-58.6 113.9-3.8 7.8-7.6 15.5-11.3 23.2-23.4 48.2-44.6 94.8-63.7 139.5-21.7 50.7-40.7 99.2-57.5 145.1-11 30.2-21 59.4-30.1 87.4-7.5 24-14.7 47.9-21.5 71.8-16 56.3-29.9 112.4-41.2 168.3L353 1935.1c14.3-38.1 28.9-76.8 44-116C401.1 1808.2 405.4 1797.3 409.6 1786.3z"/><linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-7161.7642" y1="-2379.1431" x2="-5631.2524" y2="-2379.1431" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset="0" style="stop-color:#282662"/><stop offset=".0954839" style="stop-color:#662E8D"/><stop offset=".7882" style="stop-color:#9F2064"/><stop offset=".9487" style="stop-color:#CD2032"/></linearGradient><path fill="url(#SVGID_5_)" d="M243.5 1729.4c-13.6 68.2-23.2 136.2-28 203.8-.2 2.4-.4 4.7-.5 7.1-33.7-54-124-106.8-123.8-106.2 64.6 93.7 113.7 186.7 120.9 278-34.6 7.1-82-3.2-136.8-23.3 57.1 52.5 1e2 67 116.7 70.9-52.5 3.3-107.1 39.3-162.1 80.8 80.5-32.8 145.5-45.8 192.1-35.3C148.1 2414.2 74.1 2645 0 2890c22.7-6.7 36.2-21.9 43.9-42.6 13.2-44.4 100.8-335.6 238-718.2 3.9-10.9 7.8-21.8 11.8-32.9 1.1-3 2.2-6.1 3.3-9.2 14.5-40.1 29.5-81.1 45.1-122.9 3.5-9.5 7.1-19 10.7-28.6.1-.2.1-.4.2-.6l-107.9-213.2C244.6 1724.4 244 1726.9 243.5 1729.4z"/><linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="-7374.1626" y1="-2117.1309" x2="-4461.8428" y2="-2117.1309" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset=".3233" style="stop-color:#9E2064"/><stop offset=".6302" style="stop-color:#C92037"/><stop offset=".7514" style="stop-color:#CD2335"/><stop offset="1" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_6_)" d="M805.6 937c-3.1 6.3-6.2 12.7-9.3 19.1-9.3 19.2-18.8 38.8-28.3 58.8-10.3 21.7-20.7 43.9-31.3 66.5-5.3 11.4-10.6 22.9-16 34.6-16.1 35-32.4 71.1-48.9 108.3-20.3 45.8-41 93.4-62 142.8-20 47.1-40.3 95.9-60.9 146.3-19.5 47.9-39.3 97.3-59.3 148.3-17.8 45.4-35.9 92.1-54 140.1-.9 2.3-1.8 4.7-2.6 7-18 47.6-36.2 96.6-54.6 146.8-.4 1.1-.8 2.3-1.3 3.4l86.9-9.5c-1.7-.3-3.5-.5-5.2-.9 103.9-13 242.1-90.6 331.4-186.5 41.1-44.2 78.5-96.3 113-157.3 25.7-45.4 49.8-95.8 72.8-151.5 20.1-48.7 39.4-101.4 58-158.6-23.9 12.6-51.2 21.8-81.4 28.2-5.3 1.1-10.7 2.2-16.1 3.1-5.5 1-11 1.8-16.6 2.6.1.0.1-.1.2-.1 96.9-37.3 158-109.2 202.4-197.4-25.5 17.4-66.9 40.1-116.6 51.1-6.7 1.5-13.7 2.7-20.7 3.7-1.7.3-3.5.6-5.2.8.1.0.1.0.1-.1h.1c33.6-14.1 62-29.8 86.6-48.4 5.3-4 10.4-8.1 15.3-12.3 7.5-6.5 14.7-13.3 21.5-20.5 4.4-4.6 8.6-9.3 12.7-14.2 9.6-11.5 18.7-23.9 27.1-37.3 2.6-4.1 5.1-8.3 7.6-12.6 3.2-6.2 6.3-12.3 9.3-18.3 13.5-27.2 24.4-51.5 33-72.8 4.3-10.6 8.1-20.5 11.3-29.7 1.3-3.7 2.5-7.2 3.7-10.6 3.4-10.2 6.2-19.3 8.4-27.3 3.3-12 5.3-21.5 6.4-28.4-3.3 2.6-7.1 5.2-11.3 7.7-29.3 17.5-79.5 33.4-119.9 40.8l79.8-8.8-79.8 8.8c-.6.1-1.2.2-1.8.3-4 .7-8.1 1.3-12.2 2 .7-.3 1.4-.7 2.1-1l-273 29.9C806.6 935 806.1 936 805.6 937z"/><linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-7554.8232" y1="-2132.0981" x2="-4642.5034" y2="-2132.0981" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset=".3233" style="stop-color:#9E2064"/><stop offset=".6302" style="stop-color:#C92037"/><stop offset=".7514" style="stop-color:#CD2335"/><stop offset="1" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_7_)" d="M1112.9 385.1c-24.3 37.3-50.8 79.6-79.4 127.5-1.5 2.5-3 5.1-4.5 7.6-24.6 41.5-50.8 87.1-78.3 137-23.8 43.1-48.5 89.3-74.3 139C854 839.5 830.8 885.4 807 934l273-29.9c79.5-36.6 115.1-69.7 149.6-117.6 9.2-13.2 18.4-27 27.5-41.3 28-43.8 55.6-92 80.1-139.9 23.7-46.3 44.7-92.2 60.7-133.5 10.2-26.3 18.4-50.8 24.1-72.3 5-19 8.9-36.9 11.9-54.1C1327.9 363.5 1197.6 380.9 1112.9 385.1z"/><path fill="#be202e" d="M936.5 1326.1c-5.5 1-11 1.8-16.6 2.6C925.5 1328 931 1327.1 936.5 1326.1z"/><path opacity=".35" fill="#be202e" d="M936.5 1326.1c-5.5 1-11 1.8-16.6 2.6C925.5 1328 931 1327.1 936.5 1326.1z"/><linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="-7374.1626" y1="-2027.484" x2="-4461.8433" y2="-2027.484" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset=".3233" style="stop-color:#9E2064"/><stop offset=".6302" style="stop-color:#C92037"/><stop offset=".7514" style="stop-color:#CD2335"/><stop offset="1" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_8_)" d="M936.5 1326.1c-5.5 1-11 1.8-16.6 2.6C925.5 1328 931 1327.1 936.5 1326.1z"/><path fill="#be202e" d="M980 1186.8c1.8-.2 3.5-.5 5.2-.8C983.5 1186.3 981.8 1186.6 980 1186.8z"/><path opacity=".35" fill="#be202e" d="M980 1186.8c1.8-.2 3.5-.5 5.2-.8C983.5 1186.3 981.8 1186.6 980 1186.8z"/><linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="-7374.1626" y1="-2037.7417" x2="-4461.8433" y2="-2037.7417" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset=".3233" style="stop-color:#9E2064"/><stop offset=".6302" style="stop-color:#C92037"/><stop offset=".7514" style="stop-color:#CD2335"/><stop offset="1" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_9_)" d="M980 1186.8c1.8-.2 3.5-.5 5.2-.8C983.5 1186.3 981.8 1186.6 980 1186.8z"/><path fill="#be202e" d="M980.2 1186.7z"/><path opacity=".35" fill="#be202e" d="M980.2 1186.7z"/><linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="-5738.0635" y1="-2039.799" x2="-5094.3457" y2="-2039.799" gradientTransform="matrix(0.4226 -0.9063 0.9063 0.4226 5117.8774 -2859.9343)"><stop offset=".3233" style="stop-color:#9E2064"/><stop offset=".6302" style="stop-color:#C92037"/><stop offset=".7514" style="stop-color:#CD2335"/><stop offset="1" style="stop-color:#E97826"/></linearGradient><path fill="url(#SVGID_10_)" d="M980.2 1186.7z"/></svg></div></a><ul class=footer-link><li><a class=white href=http://www.apache.org>Foundation</a></li><li><a class=white href=http://www.apache.org/licenses/>License</a></li><li><a class=white href=https://www.apache.org/security/>Security</a></li><li><a class=white href=http://www.apache.org/events/current-event>Events</a></li><li><a class=white href=http://www.apache.org/foundation/sponsorship.html>Sponsorship</a></li><li><a class=white href=http://www.apache.org/foundation/thanks.html>Thanks</a></li><li><a class=white href=https://privacy.apache.org/policies/privacy-policy-public.html target=_blank>Privacy</a></li></ul></div></div><div class="col-6 text-white text-center container-center"><p>Copyright &copy; 2024 The Apache Software Foundation, Licensed under the <a class=white href=https://www.apache.org/licenses/LICENSE-2.0>Apache License Version 2.0</a></p><p>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p></div><div class=col-1></div></div></div></footer></div><script src=https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js integrity=sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN crossorigin=anonymous></script>
<script src=https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js integrity="sha512-UR25UO94eTnCVwjbXozyeVd6ZqpaAE9naiEUBK/A+QDbfSTQFhPGj5lOR6d8tsgbBk84Ggb5A3EkjsOgPRPcKA==" crossorigin=anonymous></script>
<script src=/js/tabpane-persist.js></script>
<script src=/js/main.min.aa9f4c5dae6a98b2c46277f4c56f1673a2b000d1756ce4ffae93784cab25e6d5.js integrity="sha256-qp9MXa5qmLLEYnf0xW8Wc6KwANF1bOT/rpN4TKsl5tU=" crossorigin=anonymous></script>
<script src=/js/prism.js></script></body></html>