diff --git a/.github/workflows/auto_cherry_pick.yml b/.github/workflows/auto_cherry_pick.yml new file mode 100644 index 00000000000..3cb722612ba --- /dev/null +++ b/.github/workflows/auto_cherry_pick.yml @@ -0,0 +1,38 @@ +name: Auto Cherry Pick +on: + workflow_dispatch: + inputs: + branch_from: + description: "which branch you want to cherry pick, eg: v3.1.0" + required: true + +defaults: + run: + shell: bash + +jobs: + auto-cherry-pick: + #if: ${{ startsWith(github.event.pull_request.labels.*.name, 'cherry-pick-') && github.event.pull_request.merged == true }} + runs-on: [self-hosted, nebula-fast] + container: + image: reg.vesoft-inc.com/dashboard/dashboard-dev:centos7 + credentials: + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_PASSWORD }} + steps: + - name: keep workspace empty + run: | + rm -rf * + - name: git config set + env: + GH_BOT_PAT: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global url."https://${GH_BOT_PAT}:x-oauth-basic@github.com/".insteadOf "https://github.com/" + export GOPRIVATE="github.com/vesoft-inc" + - name: auto cherry pick + uses: xigongdaEricyang/cherry-pick-robot@for-doc + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + from_branch: ${{ github.event.inputs.branch_from }} + #pr_num: ${{ github.event.pull_request.number }} + auto_merge: false diff --git a/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md b/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md index e0c1d386ad5..ca8178aa479 100644 --- a/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md +++ b/docs-2.0/1.introduction/3.nebula-graph-architecture/4.storage-service.md @@ -247,10 +247,17 @@ When a transfer leadership command is committed, the leader will abandon its lea To avoid split-brain, when members in a Raft Group change, an intermediate state is required. In such a state, the quorum of the old group and new group always have an overlap. Thus it prevents the old or new group from making decisions unilaterally. To make it even simpler, in his doctoral thesis Diego Ongaro suggests adding or removing a peer once to ensure the overlap between the quorum of the new group and the old group. NebulaGraph also uses this approach, except that the way to add or remove a member is different. For details, please refer to addPeer/removePeer in the Raft Part class. + + ## Differences with HDFS The Storage Service is a Raft-based distributed architecture, which has certain differences with that of HDFS. For example: diff --git a/docs-2.0/2.quick-start/3.1add-storage-hosts.md b/docs-2.0/2.quick-start/3.1add-storage-hosts.md index 6c095e5bbbf..8199037ec6b 100644 --- a/docs-2.0/2.quick-start/3.1add-storage-hosts.md +++ b/docs-2.0/2.quick-start/3.1add-storage-hosts.md @@ -41,13 +41,13 @@ You have [connected to NebulaGraph](3.connect-to-nebula-graph.md). ```ngql nebula> SHOW HOSTS; - +------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+ - | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | - +------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+ - | "192.168.10.100" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | - | "192.168.10.101" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | - | "192.168.10.102" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | - +------------------+------+-----------+----------+--------------+---------------------- +------------------------+---------+ + +------------------+------+----------+--------------+---------------------- +------------------------+---------+ + | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | + +------------------+------+----------+--------------+---------------------- +------------------------+---------+ + | "192.168.10.100" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" | + | "192.168.10.101" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}"| + | "192.168.10.102" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}"| + +------------------+------+----------+--------------+---------------------- +------------------------+---------+ ``` The `Status` column of the result above shows that all Storage hosts are online. diff --git a/docs-2.0/2.quick-start/4.nebula-graph-crud.md b/docs-2.0/2.quick-start/4.nebula-graph-crud.md index bf5ccd700c5..4c65c8c0ec4 100644 --- a/docs-2.0/2.quick-start/4.nebula-graph-crud.md +++ b/docs-2.0/2.quick-start/4.nebula-graph-crud.md @@ -93,12 +93,12 @@ In this topic, we will use the following dataset to demonstrate basic CRUD opera ```ngql nebula> SHOW HOSTS; - +-------------+-----------+-----------+-----------+--------------+----------------------------------+------------------------+---------+ - | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | - +-------------+-----------+-----------+-----------+--------------+----------------------------------+------------------------+---------+ - | "storaged0" | 9779 | 19669 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "3.1.0" | - | "storaged1" | 9779 | 19669 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "3.1.0" | - | "storaged2" | 9779 | 19669 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "3.1.0" | + +-------------+-----------+-----------+--------------+----------------------------------+------------------------+---------+ + | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | + +-------------+-----------+-----------+--------------+----------------------------------+------------------------+---------+ + | "storaged0" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "{{nebula.release}}"| + | "storaged1" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "{{nebula.release}}"| + | "storaged2" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | "{{nebula.release}}"| +-------------+-----------+-----------+-----------+--------------+----------------------------------+------------------------+---------+ ``` diff --git a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md index 603ee19ed25..2b48459308c 100644 --- a/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md +++ b/docs-2.0/2.quick-start/6.cheatsheet-for-ngql.md @@ -213,7 +213,7 @@ | Pattern | Example | Description | | --------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | - |Matches patterns against your graph database, just like `MATCH` does. | `MATCH (m)-[]->(n) WHERE id(m)=="player100" OPTIONAL MATCH (n)-[]->(l) WHERE id(n)=="player125" RETURN id(m),id(n),id(l)` | If no matches are found, `OPTIONAL MATCH` will use a null for missing parts of the pattern.| + |Matches patterns against your graph database, just like `MATCH` does. | `MATCH (m)-[]->(n) WHERE id(m)=="player100" OPTIONAL MATCH (n)-[]->(l) RETURN id(m),id(n),id(l)` | If no matches are found, `OPTIONAL MATCH` will use a null for missing parts of the pattern.| * [LOOKUP](../3.ngql-guide/7.general-query-statements/5.lookup.md) diff --git a/docs-2.0/20.appendix/release-notes/explorer-release-note.md b/docs-2.0/20.appendix/release-notes/explorer-release-note.md index 3073e0ba455..7db517a913c 100644 --- a/docs-2.0/20.appendix/release-notes/explorer-release-note.md +++ b/docs-2.0/20.appendix/release-notes/explorer-release-note.md @@ -1,38 +1,47 @@ # NebulaGraph Explorer release notes -## v3.2.1 - -- Bugfix - - Fixed the bug that the connection timeout and HTTP error `500` when connecting to a non-existent address. - - Fixed the bug that the vertex properties could not be displayed on the canvas when randomly importing vertices. - -## v3.2.0 +## v3.4.0 - Feature - - Support [edge aggregation](../..//nebula-explorer/canvas-operations/visualization-mode.md). The edges with the same starting vertex, end vertex and edge type on the canvas are aggregated, making it clear which vertices have a lot of relationships. It also supports the computation of properties of aggregated edges. - - Support [schema drafting](../../nebula-explorer/db-management/draft.md). The Schema is designed directly by dragging and dropping on the canvas. The vertex and edge relationship is more intuitive and supports applying the schema to a graph space with one click. - - Support [iFrame](../../nebula-explorer/iframe.md). You can embedding canvas into third-party pages by using inline frameworks. - - Support [custom icon library and edge style](../../nebula-explorer/canvas-operations/canvas-overview.md). Explorer has ten built-in icons for industry categories and supports uploading pictures as an icon. - - Support [nGQL template](../../nebula-explorer/db-management/ngql-template.md). Design the query statement template directly or make nGQL statement as a template in the console, and then directly call the template and fill in the parameters to query. - - Support [database user management](../../nebula-explorer/db-management/dbuser_management.md). Manage database users visually, including creating and authorizing users. - - Workflow added [node2vec algorithm](../../graph-computing/algorithm-description.md). - - (Beta) Support [OAuth 2.0 authentication](../../nebula-explorer/deploy-connect/ex-ug-connect.md). Users can log in to Explorer only after being authenticated by OAuth2.0 to ensure data security. + + - Support viewing the [creation statements](../../nebula-explorer/db-management/10.create-schema.md) of the schema. + - Add a **Beta functions** switch button on the global settings page. + - Add a product feedback page. - Enhancement - - The [Dag Controller](../../nebula-explorer/deploy-connect/ex-ug-deploy.md) is built into the installation package. - - The welcome page provides some demo datasets. - - Increases the drag effect of the vertex. - - The console supports adding comments with `//`. - - The favorites folder contents can be saved on the server. - - Support searching graph space names in the graph space list. - - The workflow prompts you to enter a missing parameter manually. - - The help page provides introductory videos. - - Workflow supports the configuration of resources on the page. - - Added a white screen page for the crash. - - Optimize page loading speed. + + - Remove the timeout limit for slow queries. + - Keep history on the console page after switching pages. + - Support adding comments with `#` on the console page. + - Support adding comments with `#` or `//` when creating nGQL templates. + - Update the global settings page. + - Support the visual modification of the IP whitelist. + - Show VID on canvas by default. + - Display browser compatibility hints. + - Show the kernel version in the connection information. + - Add indexes to the built-in dataset. + - Optimize the login page. + - Optimize Workflow: + - Add algorithm descriptions. + - Optimize the parameter configurations of the graph algorithm. + - Optimize the presentation of the result. + - Optimize interactions: + - Vertex filter + - Query by tag + - Search path + - Optimize presentations: + - Optimize the presentation of schema statistics. + - Optimize the layout of force. + - Optimize the layout of the visual query results after importing them to the canvas. + - Optimize the presentation of vertices on dangling edges. + - Optimize the console page. + - Optimize hints: + - Optimize guidances. + - Optimize error messages. - Bugfix - - Fixed the bug that the right-click menu would not collapse automatically. - - Fixed the bug that the canvas auto-scaling when adding filter criteria. - - Fixed the bug that the canvas shook when switching to 3D mode with a large amount of data. - - Fixed the bug that importing Int8/16/32 and fixed_string data failed. + + - Fix the bug that can not be able to view the import task log. + - Fix the bug that some data of the edges in the `demo_basketballplayer` dataset is missing. + - Fix the crash of the page. + - Fix the bug that the results of the graph algorithm in the workflow can not show the details of vertices after importing them to canvas. diff --git a/docs-2.0/20.appendix/release-notes/studio-release-note.md b/docs-2.0/20.appendix/release-notes/studio-release-note.md index 83955f511f2..731017ebc52 100644 --- a/docs-2.0/20.appendix/release-notes/studio-release-note.md +++ b/docs-2.0/20.appendix/release-notes/studio-release-note.md @@ -1,16 +1,21 @@ # NebulaGraph Studio release notes -## v3.5.0 +## v3.6.0 - Feature - - Support [schema drafting](../../nebula-studio/quick-start/draft.md). The Schema is designed directly by dragging and dropping on the canvas. The vertex and edge relationship is more intuitive and supports applying the schema to a graph space with one click. + - Support viewing the [creation statements](../../nebula-studio/manage-schema/st-ug-view-schema.md) of the schema. + - Add product feedback page. - Enhancement - - The welcome page provides some demo datasets. - - The console supports adding comments with `//`. - - The favorites folder contents can be saved on the server. - - Support searching graph space names in the graph space list. - - Added a white screen page for the crash. + - Remove the timeout limit for slow queries. + - Browser compatibility hint. + - Optimize the login page. + - Support adding comments with `#` on the console page. + - Optimize the console page. - Bugfix - - Fixed the bug that importing Int8/16/32 and fixed_string data failed. \ No newline at end of file + + - Fix the bug that the list has not been refreshed after uploading files. + - Fix the invalid error message of the schema drafting. + - Fix the bug that the **view schema** data has not been cleared after switching the login user. + - Fix the presentation problem of the thumbnail in the schema drafting. \ No newline at end of file diff --git a/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md b/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md index 8ac3cb19daf..dffa6db24aa 100644 --- a/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md +++ b/docs-2.0/3.ngql-guide/1.nGQL-overview/3.graph-patterns.md @@ -58,16 +58,18 @@ Patterns can also describe a vertex that has multiple tags. For example: Vertices and edges are the fundamental elements in a graph. In nGQL, properties are added to them for richer models. -In the patterns, the properties can be expressed as follows: some key-value pairs are enclosed in curly brackets and separated by commas. For example, a vertex with two properties will be like: +In the patterns, the properties can be expressed as follows: some key-value pairs are enclosed in curly brackets and separated by commas, and the tag or edge type to which a property belongs must be specified. + +For example, a vertex with two properties will be like: ```ngql -(a {name: 'Andres', sport: 'Brazilian Ju-Jitsu'}) +(a:player{name: "Tim Duncan", age: 42}) ``` One of the edges that connect to this vertex can be like: ```ngql -(a)-[{blocked: false}]->(b) +(a)-[e:follow{degree: 95}]->(b) ``` ## Patterns for edges diff --git a/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md b/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md index 892a9cd6900..d8c6f6cf1b8 100644 --- a/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md +++ b/docs-2.0/3.ngql-guide/1.nGQL-overview/ngql-style-guide.md @@ -202,7 +202,7 @@ The strings should be surrounded by double quotes. Not recommended: ```ngql - FETCH PROP ON player "player100" YIELD properties(vertex); + FETCH PROP ON player "player100" YIELD properties(vertex) ``` Recommended: diff --git a/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md b/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md index 70f5c553b98..3b0cfe7d1cd 100644 --- a/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md +++ b/docs-2.0/3.ngql-guide/10.tag-statements/1.create-tag.md @@ -34,7 +34,7 @@ CREATE TAG [IF NOT EXISTS] |``|1. The tag name must be **unique** in a graph space.
2. Once the tag name is set, it can not be altered.
3. The name of the tag starts with a letter, supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. To use special characters (the period character (.) is excluded) or reserved keywords as identifiers, quote them with backticks. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).| |``|The name of the property. It must be unique for each tag. The rules for permitted property names are the same as those for tag names.| |``|Shows the data type of each property. For a full description of the property data types, see [Data types](../3.data-types/1.numeric.md) and [Boolean](../3.data-types/2.boolean.md).| -|`NULL \| NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`.| +|`NULL \| NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`. `DEFAULT` must be specified if `NOT NULL` is set.| |`DEFAULT`|Specifies a default value for a property. The default value can be a literal value or an expression supported by NebulaGraph. If no value is specified, the default value is used when inserting a new vertex.| |`COMMENT`|The remarks of a certain property or the tag itself. The maximum length is 256 bytes. By default, there will be no comments on a tag.| |`TTL_DURATION`|Specifies the life cycle for the property. The property that exceeds the specified TTL expires. The expiration threshold is the `TTL_COL` value plus the `TTL_DURATION`. The default value of `TTL_DURATION` is `0`. It means the data never expires.| diff --git a/docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md b/docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md index 7a1e62f186c..ad8f9820faf 100644 --- a/docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md +++ b/docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md @@ -2,12 +2,14 @@ `ALTER TAG` alters the structure of a tag with the given name in a graph space. You can add or drop properties, and change the data type of an existing property. You can also set a [TTL](../8.clauses-and-options/ttl-options.md) (Time-To-Live) on a property, or change its TTL duration. -## Prerequisites +## Notes - Running the `ALTER TAG` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error. - Before you alter properties for a tag, make sure that the properties are not indexed. If the properties contain any indexes, the conflict error `[ERROR (-1005)]: Conflict!` will occur when you `ALTER TAG`. For more information on dropping an index, see [DROP INDEX](../14.native-index-statements/6.drop-native-index.md). +- The property name must be unique in a tag. If you add a property with the same name as an existing property or a dropped property, the operation fails. + ## Syntax ```ngql @@ -29,6 +31,8 @@ ttl_definition: - Multiple `ADD`, `DROP`, and `CHANGE` clauses are permitted in a single `ALTER TAG` statement, separated by commas. +- When a property value is set to `NOT NULL` using `ADD` or `CHANGE`, a default value must be specified for the property, that is, the value of `DEFAULT` must be specified. + ## Examples ```ngql diff --git a/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md b/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md index 4e53f57593a..d07435ef79a 100644 --- a/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md +++ b/docs-2.0/3.ngql-guide/11.edge-type-statements/1.create-edge.md @@ -34,7 +34,7 @@ CREATE EDGE [IF NOT EXISTS] |``|The edge type name must be **unique** in a graph space. Once the edge type name is set, it can not be altered. The name of the edge type starts with a letter, supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. To use special characters or reserved keywords as identifiers, quote them with backticks. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).| |``|The name of the property. It must be unique for each edge type. The rules for permitted property names are the same as those for edge type names.| |``|Shows the data type of each property. For a full description of the property data types, see [Data types](../3.data-types/1.numeric.md) and [Boolean](../3.data-types/2.boolean.md).| -|`NULL \| NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`.| +|`NULL \| NOT NULL`|Specifies if the property supports `NULL | NOT NULL`. The default value is `NULL`. `DEFAULT` must be specified if `NOT NULL` is set.| |`DEFAULT`|Specifies a default value for a property. The default value can be a literal value or an expression supported by NebulaGraph. If no value is specified, the default value is used when inserting a new edge.| |`COMMENT`|The remarks of a certain property or the edge type itself. The maximum length is 256 bytes. By default, there will be no comments on an edge type.| |`TTL_DURATION`|Specifies the life cycle for the property. The property that exceeds the specified TTL expires. The expiration threshold is the `TTL_COL` value plus the `TTL_DURATION`. The default value of `TTL_DURATION` is `0`. It means the data never expires.| diff --git a/docs-2.0/3.ngql-guide/11.edge-type-statements/3.alter-edge.md b/docs-2.0/3.ngql-guide/11.edge-type-statements/3.alter-edge.md index 505eb07ccc3..2577de75a95 100644 --- a/docs-2.0/3.ngql-guide/11.edge-type-statements/3.alter-edge.md +++ b/docs-2.0/3.ngql-guide/11.edge-type-statements/3.alter-edge.md @@ -2,12 +2,14 @@ `ALTER EDGE` alters the structure of an edge type with the given name in a graph space. You can add or drop properties, and change the data type of an existing property. You can also set a [TTL](../8.clauses-and-options/ttl-options.md) (Time-To-Live) on a property, or change its TTL duration. -## Prerequisites +## Notes - Running the `ALTER EDGE` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error. - Before you alter properties for an edge type, make sure that the properties are not indexed. If the properties contain any indexes, the conflict error `[ERROR (-1005)]: Conflict!` will occur when you `ALTER EDGE`. For more information on dropping an index, see [DROP INDEX](../14.native-index-statements/6.drop-native-index.md). +- The property name must be unique in an edge type. If you add a property with the same name as an existing property or a dropped property, the operation fails. + ## Syntax ```ngql @@ -29,6 +31,8 @@ ttl_definition: - Multiple `ADD`, `DROP`, and `CHANGE` clauses are permitted in a single `ALTER EDGE` statement, separated by commas. +- When a property value is set to `NOT NULL` using `ADD` or `CHANGE`, a default value must be specified for the property, that is, the value of `DEFAULT` must be specified. + ## Example ```ngql diff --git a/docs-2.0/3.ngql-guide/17.query-tuning-statements/2.kill-session.md b/docs-2.0/3.ngql-guide/17.query-tuning-statements/2.kill-session.md index 4235ce35359..4f8066f2929 100644 --- a/docs-2.0/3.ngql-guide/17.query-tuning-statements/2.kill-session.md +++ b/docs-2.0/3.ngql-guide/17.query-tuning-statements/2.kill-session.md @@ -5,7 +5,7 @@ The `KILL SESSION` command is to terminate running sessions. !!! note - Only the NebulaGraph `root` user can terminate sessions. - - After executing the `KILL SESSION` command, all Graph services synchronize the latest session information after `2* session_reclaim_interval_secs` seconds. + - After executing the `KILL SESSION` command, all Graph services synchronize the latest session information after `2* session_reclaim_interval_secs` seconds (`120` seconds by default). ## Syntax @@ -26,7 +26,7 @@ You can run the `KILL SESSION` command to terminate one or multiple sessions. Th ``` SHOW SESSIONS | YIELD $-.SessionId AS sid [WHERE ] - | KILL {SESSION|SESSIONS} $.sid + | KILL {SESSION|SESSIONS} $-.sid ``` !!! note diff --git a/docs-2.0/3.ngql-guide/5.operators/6.set.md b/docs-2.0/3.ngql-guide/5.operators/6.set.md index d2b4fd38826..caa90f30ed9 100644 --- a/docs-2.0/3.ngql-guide/5.operators/6.set.md +++ b/docs-2.0/3.ngql-guide/5.operators/6.set.md @@ -4,9 +4,9 @@ This topic will describe the set operators, including `UNION`, `UNION ALL`, `INT All set operators have equal precedence. If a nGQL statement contains multiple set operators, NebulaGraph will evaluate them from left to right unless parentheses explicitly specify another order. -## OpenCypher compatibility +!!! caution -Set operators apply to native nGQL only. + The names and order of the variables defined in the query statements before and after the set operator must be consistent. For example, the names and order of `a,b,c` in `RETURN a,b,c UNION RETURN a,b,c` need to be consistent. ## UNION, UNION DISTINCT, and UNION ALL @@ -35,6 +35,21 @@ nebula> GO FROM "player102" OVER follow YIELD dst(edge) \ | "player125" | +-------------+ +nebula> MATCH (v:player) \ + WITH v.player.name AS v \ + RETURN n ORDER BY n LIMIT 3 \ + UNION \ + UNWIND ["Tony Parker", "Ben Simmons"] AS n \ + RETURN n; ++---------------------+ +| n | ++---------------------+ +| "Amar'e Stoudemire" | +| "Aron Baynes" | +| "Ben Simmons" | +| "Tony Parker" | ++---------------------+ + # The following statement returns the union of two query results with duplicated elements. nebula> GO FROM "player102" OVER follow YIELD dst(edge) \ UNION ALL \ @@ -48,6 +63,22 @@ nebula> GO FROM "player102" OVER follow YIELD dst(edge) \ | "player125" | +-------------+ +nebula> MATCH (v:player) \ + WITH v.player.name AS n \ + RETURN n ORDER BY n LIMIT 3 \ + UNION ALL \ + UNWIND ["Tony Parker", "Ben Simmons"] AS n \ + RETURN n; ++---------------------+ +| n | ++---------------------+ +| "Amar'e Stoudemire" | +| "Aron Baynes" | +| "Ben Simmons" | +| "Tony Parker" | +| "Ben Simmons" | ++---------------------+ + # UNION can also work with the YIELD statement. The DISTINCT keyword will check duplication by all the columns for every line, and remove duplicated lines if every column is the same. nebula> GO FROM "player102" OVER follow \ YIELD dst(edge) AS id, properties(edge).degree AS Degree, properties($$).age AS Age \ @@ -77,6 +108,7 @@ nebula> GO FROM "player102" OVER follow \ ### Example ```ngql +# The following statement returns the intersection of two query results. nebula> GO FROM "player102" OVER follow \ YIELD dst(edge) AS id, properties(edge).degree AS Degree, properties($$).age AS Age \ INTERSECT \ @@ -86,6 +118,30 @@ nebula> GO FROM "player102" OVER follow \ | id | Degree | Age | +----+--------+-----+ +----+--------+-----+ + +nebula> MATCH (v:player)-[e:follow]->(v2) \ + WHERE id(v) == "player102" \ + RETURN id(v2) As id, e.degree As Degree, v2.player.age AS Age \ + INTERSECT \ + MATCH (v:player)-[e:follow]->(v2) \ + WHERE id(v) == "player100" \ + RETURN id(v2) As id, e.degree As Degree, v2.player.age AS Age; ++----+--------+-----+ +| id | Degree | Age | ++----+--------+-----+ ++----+--------+-----+ + +nebula> UNWIND [1,2] AS a RETURN a \ + INTERSECT \ + UNWIND [1,2,3,4] AS a \ + RETURN a; ++---+ +| a | ++---+ +| 1 | +| 2 | ++---+ + ``` ## MINUS @@ -99,6 +155,7 @@ Operator `MINUS` returns the subtraction (or difference) of two sets A and B (de ### Example ```ngql +# The following statement returns the elements in the first query result but not in the second query result. nebula> GO FROM "player100" OVER follow YIELD dst(edge) \ MINUS \ GO FROM "player102" OVER follow YIELD dst(edge); @@ -108,14 +165,39 @@ nebula> GO FROM "player100" OVER follow YIELD dst(edge) \ | "player125" | +-------------+ -nebula> GO FROM "player102" OVER follow YIELD dst(edge) \ +nebula> GO FROM "player102" OVER follow YIELD dst(edge) AS id\ MINUS \ - GO FROM "player100" OVER follow YIELD dst(edge); + GO FROM "player100" OVER follow YIELD dst(edge) AS id; +-------------+ -| dst(EDGE) | +| id | ++-------------+ +| "player100" | ++-------------+ + +nebula> MATCH (v:player)-[e:follow]->(v2) \ + WHERE id(v) =="player102" \ + RETURN id(v2) AS id\ + MINUS \ + MATCH (v:player)-[e:follow]->(v2) \ + WHERE id(v) =="player100" \ + RETURN id(v2) AS id; ++-------------+ +| id | +-------------+ | "player100" | +-------------+ + +nebula> UNWIND [1,2,3] AS a RETURN a \ + MINUS \ + WITH 4 AS a \ + RETURN a; ++---+ +| a | ++---+ +| 1 | +| 2 | +| 3 | ++---+ ``` ## Precedence of the set operators and pipe operators diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md index bd235372801..c1a2a3fb3da 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/6.list.md @@ -142,8 +142,8 @@ nebula> RETURN reduce(totalNum = -4 * 5, n IN [1, 2] | totalNum + n * 2) AS r; +-----+ nebula> MATCH p = (n:player{name:"LeBron James"})<-[:follow]-(m) \ - RETURN nodes(p)[0].age AS src1, nodes(p)[1].age AS dst2, \ - reduce(totalAge = 100, n IN nodes(p) | totalAge + n.age) AS sum; + RETURN nodes(p)[0].player.age AS src1, nodes(p)[1].player.age AS dst2, \ + reduce(totalAge = 100, n IN nodes(p) | totalAge + n.player.age) AS sum; +------+------+-----+ | src1 | dst2 | sum | +------+------+-----+ diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/8.predicate.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/8.predicate.md index f26e936c018..13f80c3608a 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/8.predicate.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/8.predicate.md @@ -62,8 +62,8 @@ nebula> WITH [1, 2, 3, 4, 5, NULL] AS a \ +-------------------------+ nebula> MATCH p = (n:player{name:"LeBron James"})<-[:follow]-(m) \ - RETURN nodes(p)[0].name AS n1, nodes(p)[1].name AS n2, \ - all(n IN nodes(p) WHERE n.name NOT STARTS WITH "D") AS b; + RETURN nodes(p)[0].player.name AS n1, nodes(p)[1].player.name AS n2, \ + all(n IN nodes(p) WHERE n.player.name NOT STARTS WITH "D") AS b; +----------------+-------------------+-------+ | n1 | n2 | b | +----------------+-------------------+-------+ @@ -76,7 +76,7 @@ nebula> MATCH p = (n:player{name:"LeBron James"})<-[:follow]-(m) \ +----------------+-------------------+-------+ nebula> MATCH p = (n:player{name:"LeBron James"})-[:follow]->(m) \ - RETURN single(n IN nodes(p) WHERE n.age > 40) AS b; + RETURN single(n IN nodes(p) WHERE n.player.age > 40) AS b; +------+ | b | +------+ diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md b/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md index 742b8262674..5ee42e3e779 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/2.match.md @@ -195,7 +195,7 @@ nebula> MATCH (v:player) \ In openCypher 9, `=` is the equality operator. However, in nGQL, `==` is the equality operator and `=` is the assignment operator (as in C++ or Java). -You also use properties without specifying a tag to get vertices directly. For example, to get all the vertices with the vertex property value Tim Duncan. +Use the `WHERE` clause to directly get all the vertices with the vertex property value Tim Duncan. ```ngql nebula> MATCH (v) \ @@ -414,7 +414,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[e:follow{degree:95}]->(v2) \ ``` -You also use properties without specifying an edge type to get edges directly. For example, to get all the edges with the edge property value 90. +Use the `WHERE` clause to directly get all the edges with the edge property value 90. ```ngql nebula> MATCH ()-[e]->() \ @@ -634,6 +634,34 @@ nebula> MATCH (v1:player{name:"Tim Duncan"}), (v2:team{name:"Spurs"}) \ +----------------------------------------------------+----------------------------------+ ``` +### Match shortest paths + +The `allShortestPaths` function can be used to find all shortest paths between two vertices. + +``` +nebula> MATCH p = allShortestPaths((a:player{name:"Tim Duncan"})-[e*..5]-(b:player{name:"Tony Parker"})) \ + RETURN p; ++------------------------------------------------------------------------------------------------------------------------------------+ +| p | ++------------------------------------------------------------------------------------------------------------------------------------+ +| <("player100" :player{age: 42, name: "Tim Duncan"})<-[:follow@0 {degree: 95}]-("player101" :player{age: 36, name: "Tony Parker"})> | +| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})> | ++------------------------------------------------------------------------------------------------------------------------------------+ +``` + +The `shortestPath` function can be used to find a single shortest path between two vertices. + + +``` +nebula> MATCH p = shortestPath((a:player{name:"Tim Duncan"})-[e*..5]-(b:player{name:"Tony Parker"})) \ + RETURN p; ++------------------------------------------------------------------------------------------------------------------------------------+ +| p | ++------------------------------------------------------------------------------------------------------------------------------------+ +| <("player100" :player{age: 42, name: "Tim Duncan"})<-[:follow@0 {degree: 95}]-("player101" :player{age: 36, name: "Tony Parker"})> | ++------------------------------------------------------------------------------------------------------------------------------------+ +``` + ## Retrieve with multiple match diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/4.show-create-space.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/4.show-create-space.md index 9cc161058ef..75410c2c85d 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/4.show-create-space.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/4.show-create-space.md @@ -14,9 +14,9 @@ SHOW CREATE SPACE ; ```ngql nebula> SHOW CREATE SPACE basketballplayer; -+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Space | Create Space | -+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| "basketballplayer" | "CREATE SPACE `basketballplayer` (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32), atomic_edge = false)" | -+--------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| Space | Create Space | ++--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ +| "basketballplayer" | "CREATE SPACE `basketballplayer` (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32))" | ++--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md index 9dfdc1bf4f9..cea96bd461b 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md @@ -17,13 +17,13 @@ SHOW HOSTS [GRAPH | STORAGE | META]; ```ngql nebula> SHOW HOSTS; -+-------------+-------+-----------+----------+--------------+----------------------------------+------------------------------+---------+ -| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | -+-------------+-------+-----------+----------+--------------+----------------------------------+------------------------------+---------+ -| "storaged0" | 9779 | 19779 | "ONLINE" | 8 | "docs:5, basketballplayer:3" | "docs:5, basketballplayer:3" | "{{nebula.release}}" | -| "storaged1" | 9779 | 19779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4" | "{{nebula.release}}" | -| "storaged2" | 9779 | 19779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3" | "{{nebula.release}}" | -+-------------+-------+-----------+----------+--------------+----------------------------------+------------------------------+---------+ ++-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+ +| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | ++-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+ +| "storaged0" | 9779 | "ONLINE" | 8 | "docs:5, basketballplayer:3" | "docs:5, basketballplayer:3" | "{{nebula.release}}" | +| "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4" | "{{nebula.release}}" | +| "storaged2" | 9779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3" | "{{nebula.release}}" | ++-------------+-------+----------+--------------+----------------------------------+------------------------------+---------+ nebula> SHOW HOSTS GRAPH; +-----------+------+----------+---------+--------------+---------+ diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/optional-match.md b/docs-2.0/3.ngql-guide/7.general-query-statements/optional-match.md index 5dca761e716..9be003e6843 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/optional-match.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/optional-match.md @@ -10,19 +10,27 @@ The `OPTIONAL MATCH` clause is used to search for the pattern described in it. ` This topic applies to the openCypher syntax in nGQL only. +## Limitations + +The `WHERE` clause cannot be used in an `OPTIONAL MATCH` clause. + ## Example The example of the use of `OPTIONAL MATCH` in the `MATCH` statement is as follows: ```ngql nebula> MATCH (m)-[]->(n) WHERE id(m)=="player100" \ - OPTIONAL MATCH (n)-[]->(l) WHERE id(n)=="player125" \ + OPTIONAL MATCH (n)-[]->(l) \ RETURN id(m),id(n),id(l); +-------------+-------------+-------------+ | id(m) | id(n) | id(l) | +-------------+-------------+-------------+ | "player100" | "team204" | __NULL__ | -| "player100" | "player101" | __NULL__ | +| "player100" | "player101" | "team204" | +| "player100" | "player101" | "team215" | +| "player100" | "player101" | "player100" | +| "player100" | "player101" | "player102" | +| "player100" | "player101" | "player125" | | "player100" | "player125" | "team204" | | "player100" | "player125" | "player100" | +-------------+-------------+-------------+ @@ -32,11 +40,16 @@ Using multiple `MATCH` instead of `OPTIONAL MATCH` returns rows that match the p ```ngql nebula> MATCH (m)-[]->(n) WHERE id(m)=="player100" \ - MATCH (n)-[]->(l) WHERE id(n)=="player125" \ + MATCH (n)-[]->(l) \ RETURN id(m),id(n),id(l); +-------------+-------------+-------------+ | id(m) | id(n) | id(l) | +-------------+-------------+-------------+ +| "player100" | "player101" | "team204" | +| "player100" | "player101" | "team215" | +| "player100" | "player101" | "player100" | +| "player100" | "player101" | "player102" | +| "player100" | "player101" | "player125" | | "player100" | "player125" | "team204" | | "player100" | "player125" | "player100" | +-------------+-------------+-------------+ diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md index 794bc867263..ca2d7a68965 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md @@ -171,6 +171,19 @@ nebula> GO FROM "1" \ | "1" | "2" | 4 | 14 | | "1" | "2" | 3 | 13 | +-----------+-----------+------+---------------------+ + +# Filter edges by rank. Find follow edges with rank equal to 0. +nebula> MATCH (v)-[e:follow]->() \ + WHERE rank(e)==0 \ + RETURN *; ++------------------------------------------------------------+-----------------------------------------------------+ +| v | e | ++------------------------------------------------------------+-----------------------------------------------------+ +| ("player142" :player{age: 29, name: "Klay Thompson"}) | [:follow "player142"->"player117" @0 {degree: 90}] | +| ("player139" :player{age: 34, name: "Marc Gasol"}) | [:follow "player139"->"player138" @0 {degree: 99}] | +| ("player108" :player{age: 36, name: "Boris Diaw"}) | [:follow "player108"->"player100" @0 {degree: 80}] | +| ("player108" :player{age: 36, name: "Boris Diaw"}) | [:follow "player108"->"player101" @0 {degree: 80}] | +... ``` ## Filter on strings diff --git a/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md b/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md index a3cbff286b4..32a053b5f7d 100644 --- a/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md +++ b/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md @@ -25,7 +25,7 @@ CREATE SPACE [IF NOT EXISTS] ( |``|Uniquely identifies a graph space in a NebulaGraph instance. The name of the graph space starts with a letter, supports 1 to 4 bytes UTF-8 encoded characters, such as English letters (case-sensitive), digits, and Chinese characters, but does not support special characters except underscores. To use special characters or reserved keywords as identifiers, quote them with backticks. For more information, see [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md).| |`partition_num`|Specifies the number of partitions in each replica. The suggested value is 20 times (2 times for HDD) the number of the hard disks in the cluster. For example, if you have three hard disks in the cluster, we recommend that you set 60 partitions. The default value is 100.| |`replica_factor`|Specifies the number of replicas in the cluster. The suggested number is 3 in a production environment and 1 in a test environment. The replica number must be an **odd number** for the need of quorum-based voting. The default value is 1.| -|`vid_type`|A required parameter. Specifies the VID type in a graph space. Available values are `FIXED_STRING(N)` and `INT64`. `INT` equals to `INT64`.
``FIXED_STRING()` specifies the VID as a string, while `INT64` specifies it as an integer. `N` represents the maximum length of the VIDs. If you set a VID that is longer than `N` bytes, NebulaGraph throws an error.| +|`vid_type`|A required parameter. Specifies the VID type in a graph space. Available values are `FIXED_STRING(N)` and `INT64`. `INT` equals to `INT64`.
``FIXED_STRING()` specifies the VID as a string, while `INT64` specifies it as an integer. `N` represents the maximum length of the VIDs. If you set a VID that is longer than `N` bytes, NebulaGraph throws an error. Note, for UTF-8 chars, the length may vary in different cases, i.e. a UTF-8 Chinese char is 3 byte, this means 11 Chinese chars(length-33) will exeed a FIXED_STRING(32) vid defination.| |`COMMENT`|The remarks of the graph space. The maximum length is 256 bytes. By default, there is no comments on a space.| ## Black box configurations @@ -210,7 +213,7 @@ For more information, see [RocksDB official documentation](https://rocksdb.org/) | Name | Predefined value | Description | | :------------------- | :------------------------ | :------------------------------------------ | -|`memory_tracker_limit_ratio` |`0.8` | The percentage of free memory. When the free memory is lower than this value, NebulaGraph stops accepting queries.
Calculated as follows:
`Free memory / (Total memory - Reserved memory)`
**Note**: For clusters with a mixed-used environment, the value of `memory_tracker_limit_ratio` should be set to a **lower** value. For example, when Graphd is expected to occupy only 50% of memory, the value can be set to less than `0.5`.| +|`memory_tracker_limit_ratio` |`0.8` | The value of this parameter can be set to `(0, 1]`, `2`, and `3`.
`(0, 1]`: The percentage of free memory. When the free memory is lower than this value, NebulaGraph stops accepting queries.
Calculated as follows:
`Free memory / (Total memory - Reserved memory)`
**Note**: For clusters with a mixed-used environment, the value of `memory_tracker_limit_ratio` should be set to a **lower** value. For example, when Graphd is expected to occupy only 50% of memory, the value can be set to less than `0.5`.
`2`: Dynamic Self Adaptive mode. MemoryTracker dynamically adjusts the available memory based on the system's current available memory.
**Note**: This feature is experimental. As memory usage cannot be monitored in real time in dynamic adaptive mode, an OOM error may still occur to handle large memory allocations.
`3`: Disable MemoryTracker. MemoryTracker only logs memory usage and does not interfere with executions even if the limit is exceeded.| |`memory_tracker_untracked_reserved_memory_mb` |`50`| The reserved memory that is not tracked by the memory tracker. Unit: MB.| |`memory_tracker_detail_log` |`false` | Whether to enable the memory tracker log. When the value is `true`, the memory tracker log is generated.| |`memory_tracker_detail_log_interval_ms` |`60000`| The time interval for generating the memory tracker log. Unit: Millisecond. `memory_tracker_detail_log` is `true` when this parameter takes effect.| diff --git a/docs-2.0/7.data-security/1.authentication/3.role-list.md b/docs-2.0/7.data-security/1.authentication/3.role-list.md index 44f98fb2230..76ea4d1edee 100644 --- a/docs-2.0/7.data-security/1.authentication/3.role-list.md +++ b/docs-2.0/7.data-security/1.authentication/3.role-list.md @@ -159,12 +159,16 @@ nebula> > SHOW GRANTS test; nebula> REVOKE READ,WRITE EDGE * FROM test; # Show `test` user permissions -nebula> SHOW GRANTS test +nebula> SHOW GRANTS test; +--------+------------+------------+------------+-------------+ | user | READ(TAG) | READ(EDGE) | WRITE(TAG) | WRITE(EDGE) | +--------+------------+------------+------------+-------------+ | "test" | ["player"] | [] | ["player"] | [] | +--------+------------+------------+------------+-------------+ + +# When Basic role users read data without permission, the following error will occur. +nebula> MATCH (v:player)-[:likex]-() RETURN v; +[ERROR (-1008)]: PermissionError: Edge `likex' does not exist or is not readable. ``` !!! caution diff --git a/docs-2.0/8.service-tuning/load-balance.md b/docs-2.0/8.service-tuning/load-balance.md index af0ed2ff553..a4611631dce 100644 --- a/docs-2.0/8.service-tuning/load-balance.md +++ b/docs-2.0/8.service-tuning/load-balance.md @@ -27,12 +27,12 @@ After you add new storage hosts into the cluster, no partition is deployed on th ```ngql nebual> SHOW HOSTS; - +-----------------+------+-----------+----------+--------------+-----------------------+------------------------+-------------+ - | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | - +-----------------+------+-----------+----------+--------------+-----------------------+------------------------+-------------+ - | "192.168.8.101" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0-ent" | - | "192.168.8.100" | 9779 | 19779 | "ONLINE" | 15 | "basketballplayer:15" | "basketballplayer:15" | "3.1.0-ent" | - +-----------------+------+-----------+----------+--------------+-----------------------+------------------------+-------------+ + +-----------------+------+----------+--------------+-----------------------+------------------------+-------------+ + | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | + +-----------------+------+----------+--------------+-----------------------+------------------------+-------------+ + | "192.168.8.101" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" | + | "192.168.8.100" | 9779 | "ONLINE" | 15 | "basketballplayer:15" | "basketballplayer:15" | "{{nebula.release}}" | + +-----------------+------+----------+--------------+-----------------------+------------------------+-------------+ ``` 2. Enter the graph space `basketballplayer`, and execute the command `BALANCE DATA` to balance the distribution of storage partitions. @@ -74,12 +74,12 @@ After you add new storage hosts into the cluster, no partition is deployed on th ```ngql nebula> SHOW HOSTS; - +-----------------+------+-----------+----------+--------------+----------------------+------------------------+-------------+ - | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | - +-----------------+------+-----------+----------+--------------+----------------------+------------------------+-------------+ - | "192.168.8.101" | 9779 | 19779 | "ONLINE" | 7 | "basketballplayer:7" | "basketballplayer:7" | "3.1.0-ent" | - | "192.168.8.100" | 9779 | 19779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:8" | "3.1.0-ent" | - +-----------------+------+-----------+----------+--------------+----------------------+------------------------+-------------+ + +-----------------+------+----------+--------------+----------------------+------------------------+-------------+ + | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | + +-----------------+------+----------+--------------+----------------------+------------------------+-------------+ + | "192.168.8.101" | 9779 | "ONLINE" | 7 | "basketballplayer:7" | "basketballplayer:7" | "{{nebula.release}}" | + | "192.168.8.100" | 9779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:8" | "{{nebula.release}}" | + +-----------------+------+----------+--------------+----------------------+------------------------+-------------+ ``` If any subtask fails, run `RECOVER JOB ` to recover the failed jobs. If redoing load balancing does not solve the problem, ask for help in the [NebulaGraph community](https://github.com/vesoft-inc/nebula/discussions). @@ -115,12 +115,12 @@ For example, to migrate the partitions in server `192.168.8.100:9779`, the comma ```ngql nebula> BALANCE DATA REMOVE 192.168.8.100:9779; nebula> SHOW HOSTS; -+-----------------+------+-----------+----------+--------------+-----------------------+------------------------+-------------+ -| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | -+-----------------+------+-----------+----------+--------------+-----------------------+------------------------+-------------+ -| "192.168.8.101" | 9779 | 19779 | "ONLINE" | 15 | "basketballplayer:15" | "basketballplayer:15" | "3.1.0-ent" | -| "192.168.8.100" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0-ent" | -+-----------------+------+-----------+----------+--------------+-----------------------+------------------------+-------------+ ++-----------------+------+----------+--------------+-----------------------+------------------------+-------------+ +| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | ++-----------------+------+----------+--------------+-----------------------+------------------------+-------------+ +| "192.168.8.101" | 9779 | "ONLINE" | 15 | "basketballplayer:15" | "basketballplayer:15" | "{{nebula.release}}" | +| "192.168.8.100" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" | ++-----------------+------+----------+--------------+-----------------------+------------------------+-------------+ ``` !!! note @@ -152,19 +152,19 @@ After you add new storage hosts into the zone, no partition is deployed on the n ```ngql nebual> SHOW HOSTS; - +------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ - | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | - +------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ - | "192.168.10.100" | 9779 | 19779 | "ONLINE" | 4 | "basketballplayer:4" | "basketballplayer:15" | "3.1.0" | - | "192.168.10.101" | 9779 | 19779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:15" | "3.1.0" | - | "192.168.10.102" | 9779 | 19779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:15" | "3.1.0" | - | "192.168.10.103" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | - | "192.168.10.104" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | - | "192.168.10.105" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "3.1.0" | - +------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ + +------------------+------+----------+--------------+-----------------------------------+------------------------+---------+ + | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | + +------------------+------+----------+--------------+-----------------------------------+------------------------+---------+ + | "192.168.10.100" | 9779 | "ONLINE" | 4 | "basketballplayer:4" | "basketballplayer:15" | "{{nebula.release}}" | + | "192.168.10.101" | 9779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:15" | "{{nebula.release}}" | + | "192.168.10.102" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:15" | "{{nebula.release}}" | + | "192.168.10.103" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" | + | "192.168.10.104" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" | + | "192.168.10.105" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" | + +------------------+------+----------+--------------+-----------------------------------+------------------------+---------+ ``` -3. Run `BALANCE IN ZONE` to start a job to balance the distribution of storage partitions in each zone in the current graph space. +1. Run `BALANCE IN ZONE` to start a job to balance the distribution of storage partitions in each zone in the current graph space. ```ngql nebula> USE basketballplayer; @@ -199,15 +199,15 @@ After you add new storage hosts into the zone, no partition is deployed on the n ```ngql nebula> SHOW HOSTS; - +------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ - | Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | - +------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ - | "192.168.10.100" | 9779 | 19779 | "ONLINE" | 4 | "basketballplayer:4" | "basketballplayer:8" | "3.1.0" | - | "192.168.10.101" | 9779 | 19779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:8" | "3.1.0" | - | "192.168.10.102" | 9779 | 19779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:8" | "3.1.0" | - | "192.168.10.103" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:7" | "3.1.0" | - | "192.168.10.104" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:7" | "3.1.0" | - | "192.168.10.105" | 9779 | 19779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:7" | "3.1.0" | + +------------------+------+----------+--------------+-----------------------------------+------------------------+---------+ + | Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | + +------------------+------+----------+--------------+-----------------------------------+------------------------+---------+ + | "192.168.10.100" | 9779 | "ONLINE" | 4 | "basketballplayer:4" | "basketballplayer:8" | "{{nebula.release}}" | + | "192.168.10.101" | 9779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:8" | "{{nebula.release}}" | + | "192.168.10.102" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:8" | "{{nebula.release}}" | + | "192.168.10.103" | 9779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:7" | "{{nebula.release}}" | + | "192.168.10.104" | 9779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:7" | "{{nebula.release}}" | + | "192.168.10.105" | 9779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:7" | "{{nebula.release}}" | +------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ ``` @@ -267,15 +267,14 @@ Run `SHOW HOSTS` to check the balance result. ```ngql nebula> SHOW HOSTS; -+------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ -| Host | Port | HTTP port | Status | Leader count | Leader distribution | Partition distribution | Version | -+------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ -| "192.168.10.100" | 9779 | 19779 | "ONLINE" | 4 | "basketballplayer:3" | "basketballplayer:8" | "3.1.0" | -| "192.168.10.101" | 9779 | 19779 | "ONLINE" | 8 | "basketballplayer:3" | "basketballplayer:8" | "3.1.0" | -| "192.168.10.102" | 9779 | 19779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:8" | "3.1.0" | -| "192.168.10.103" | 9779 | 19779 | "ONLINE" | 0 | "basketballplayer:2" | "basketballplayer:7" | "3.1.0" | -| "192.168.10.104" | 9779 | 19779 | "ONLINE" | 0 | "basketballplayer:2" | "basketballplayer:7" | "3.1.0" | -| "192.168.10.105" | 9779 | 19779 | "ONLINE" | 0 | "basketballplayer:2" | "basketballplayer:7" | "3.1.0" | ++------------------+------+----------+--------------+-----------------------------------+------------------------+---------+ +| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version | ++------------------+------+--------------+-----------------------------------+------------------------+---------+ +| "192.168.10.101" | 9779 | "ONLINE" | 8 | "basketballplayer:3" | "basketballplayer:8" | "{{nebula.release}}" | +| "192.168.10.102" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:8" | "{{nebula.release}}" | +| "192.168.10.103" | 9779 | "ONLINE" | 0 | "basketballplayer:2" | "basketballplayer:7" | "{{nebula.release}}" | +| "192.168.10.104" | 9779 | "ONLINE" | 0 | "basketballplayer:2" | "basketballplayer:7" | "{{nebula.release}}" | +| "192.168.10.105" | 9779 | "ONLINE" | 0 | "basketballplayer:2" | "basketballplayer:7" | "{{nebula.release}}" | +------------------+------+-----------+----------+--------------+-----------------------------------+------------------------+---------+ ``` diff --git a/docs-2.0/backup-and-restore/nebula-br-ent/3.backup-data.md b/docs-2.0/backup-and-restore/nebula-br-ent/3.backup-data.md index 0c0872cf8f4..98092a37e88 100644 --- a/docs-2.0/backup-and-restore/nebula-br-ent/3.backup-data.md +++ b/docs-2.0/backup-and-restore/nebula-br-ent/3.backup-data.md @@ -13,7 +13,7 @@ You can use BR (Enterprise Edition) to back up NebulaGraph data. You can perform - During the process of a full backup, it may take a long time if the amount of the data to be backed up is large. - During the process of data backup, DDL and DML statements in the specified graph space are blocked. We recommend that you perform the backup operation during the low business peak period. - The cluster performing an incremental backup needs to be the same as the cluster specified for the previous backup. The storage path of the incremental backup should also be the same as the path of the previous backup. -- Make sure that the time between each incremental backup and the first backup is less than one [`wal_ttl`](../../5.configurations-and-logs/1.configurations/4.storage-config.md). +- Make sure that the time between each incremental backup and the last backup is less than a [`wal_ttl`](../../5.configurations-and-logs/1.configurations/4.storage-config.md) time. - Make sure that Agent has read and write permissions for the corresponding NebulaGraph cluster installation directory and backup directory. ## Prerequisites diff --git a/docs-2.0/nebula-console.md b/docs-2.0/nebula-console.md index 8da835fb624..722410c5d67 100644 --- a/docs-2.0/nebula-console.md +++ b/docs-2.0/nebula-console.md @@ -33,7 +33,7 @@ Parameter descriptions are as follows: | `-P/-port` | Sets the port number of the graphd service. The default port number is 9669. | | `-u/-user` | Sets the username of your NebulaGraph account. Before enabling authentication, you can use any existing username. The default username is `root`. | | `-p/-password` | Sets the password of your NebulaGraph account. Before enabling authentication, you can use any characters as the password. | -| `-t/-timeout` | Sets an integer-type timeout threshold of the connection. The unit is second. The default value is 120. | +| `-t/-timeout` | Sets an integer-type timeout threshold of the connection. The unit is millisecond. The default value is 120. | | `-e/-eval` | Sets a string-type nGQL statement. The nGQL statement is executed once the connection succeeds. The connection stops after the result is returned. | | `-f/-file` | Sets the path of an nGQL file. The nGQL statements in the file are executed once the connection succeeds. The result will be returned and the connection stops then. | | `-enable_ssl` | Enables SSL encryption when connecting to NebulaGraph. | diff --git a/docs-2.0/nebula-dashboard-ent/10.tasks.md b/docs-2.0/nebula-dashboard-ent/10.tasks.md index e24004d1009..74d46ec2fcb 100644 --- a/docs-2.0/nebula-dashboard-ent/10.tasks.md +++ b/docs-2.0/nebula-dashboard-ent/10.tasks.md @@ -1,25 +1,37 @@ # Task Center -It takes a certain amount of time for you to make sure whether a cluster is created or scaled successfully in NebulaGraph Dashboard Enterprise Edition. You can view the progress of such operations in Task Center. It displays the progress of ongoing operations and the history of complete operations. +NebulaGraph Dashboard Enterprise Edition allows you to view the progress of running tasks and the information of ended tasks. -The operations on clusters are defined as tasks in Task Center. Currently, there are two task types in Task Center, cluster creation and cluster scaling. +## Precautions -At the top navigation bar of the Dashboard Enterprise Edition page, click **Task Center** to view task information. +- The running tasks can not be canceled. +- The historical tasks cannot be deleted. + +## Task types + +Currently the task center supports the following types of tasks: + +- **install**: Create clusters. +- **scale**: Scale clusters. +- **version update**: Update NebulaGraph versions. +- **package upload**: Upload NebulaGraph installation packages. +- **package download**: Download NebulaGraph installation packages. +- **package deploy**: Deploy the installation package when adding a node. + +## Entry + +At the top navigation bar of the Dashboard Enterprise Edition page, click Task Center to view task information. ## Running tasks -On the **Task Center** page, click **Running Task** to view the progress of tasks that clusters are being created or scaled. +Click the tab **Running Task** to view the progress of the running tasks. - Click a task name to view the ID, node name, type, create time, and operator of the running task. - Clink **Task information** to view task details. ## Task history -On the **Task Center** page, click **Task History** to view all complete tasks. +Click **Task History** to view all ended tasks. - You can filter historical tasks by status, type, date, and time. - On the right side of the target historical task, click **Task information** to view task details, and click **Logs** to view task execution logs. - -## Delete tasks - -It is currently not possible to cancel running tasks or delete historical tasks. diff --git a/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md b/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md index 422931b24d9..23e6f04d8d9 100644 --- a/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md +++ b/docs-2.0/nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md @@ -361,3 +361,7 @@ The descriptions of the log files are as follows. |`severe.log`| Severe log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | |`slow.log`| Slow log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | |`stat.log`| Statistic log.
It takes effect only when the `Log.Mode` in the Dashboard configuration is `file`. | + +## Next to do + +[Connect to Dashboard](3.connect-dashboard.md) diff --git a/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/audit-log.md b/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/audit-log.md new file mode 100644 index 00000000000..258b23fb1a7 --- /dev/null +++ b/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/audit-log.md @@ -0,0 +1,27 @@ +# Audit log + +The NebulaGraph audit logs store and categorize all operations performed on the Graph service. Dashboard Enterprise Edition allows you to quickly view audit logs. + +!!! enterpriseonly + + Only when the cluster you created or imported is the Enterprise Edition, this feature is available. + +## Entry + +1. At the top navigation bar of the Dashboard Enterprise Edition page, click **Cluster Management**. +2. On the right side of the target cluster, click **Detail**. +3. On the left-side navigation bar of the page, click **Information**->**Audit Log**. + +!!! note + + - To use the audit log for the first time, you need to jump to the **Config Management** page as prompts to enable the audit log and restart the graph service. + - For the description of audit log parameters, see [Configure audit logs](../../..//5.configurations-and-logs/2.log-management/audit-log.md). + +## View audit log + +In the upper corner of the page, you can filter services or search for the log name. Click **View Log** in the **Operation** column. + +- Support copying all logs in the window with one click. +- Support copying the log file path. +- Support **Tail Mode** and **Range Mode** to view logs. You need to click **Refresh** after setting. +- Support searching logs by keywords (at least 3 characters). diff --git a/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/job-management.md b/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/job-management.md index 71853e2aa85..7380258c130 100644 --- a/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/job-management.md +++ b/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/job-management.md @@ -1,6 +1,6 @@ # Job management -Users can manage the jobs in a specified graph space through the dashboard, including viewing, stopping, and recovering jobs, and supports viewing the details of a single job. +Users can manage the jobs in a specified graph space through the Dashboard, including viewing, stopping, and recovering jobs, and supports viewing the details of a single job. !!! note @@ -18,19 +18,19 @@ Users can manage the jobs in a specified graph space through the dashboard, incl After you select the graph space, the page will display all the job information that has not expired by default. You can quickly find jobs through the filter box at the top of the page as follows: -- Select a job status for filtering. The status includes `QUEUE`, `RUNNING`, `FINISHED`, `FAILED`, and `STOPPED`. For the status description, see [Job manager and the JOB statements](../../../3.ngql-guide/4.job-statements.md). +- Select a job status for filtering. The status includes `QUEUE`, `RUNNING`, `FINISHED`, `FAILED`, `STOPPED`, and `SUCCEEDED`. For the status description, see [Job manager and the JOB statements](../../../3.ngql-guide/4.job-statements.md). - Select a time range for filtering. You can view the job information of the maximum of 7 days by default. You can also select a time range or quickly select latest 12 hours, 1 day, 3 days, or 7 days. - Select a `Job ID` or `Command` for filtering and enter what you want to search for. - By default, the job information page will not be updated automatically. You can set the update frequency of the job information page globally or click the ![setup](https://docs-cdn.nebula-graph.com.cn/figures/refresh-220616.png) button to update the page manually. -- Click `Detail` in the `Operation` column on the right side of the target job to view more information, including `Task ID`, `Host`, `Error Code`, etc. You can also stop or recover the job, or search for a task id. +- Click `Detail` in the `Operation` column on the right side of the target job to view more information, including `Task ID`, `Host`, `Error Code`, etc. ## Stop job -Click `Stop Job` in the `Operation` column on the right side of the target job to stop the job whose status is `QUEUE`, `RUNNING` or `FAILED`. After clicking, the status of the job becomes `STOPPED`. +Click `Stop Job` in the `Operation` column on the right side of the target job to stop an unfinished job. After clicking, the status of the job becomes `STOPPED`. ## Recover job -Click `Recover Job` in the `Operation` column on the right side of the target job to recover the job whose status is `QUEUE`, `FAILED` or `STOPPED`. After clicking, the status of the job becomes `RUNNING`. +Click `Recover Job` in the `Operation` column on the right side of the target job to recover the job whose status is `FAILED` or `STOPPED`. After clicking, the status of the job becomes `RUNNING`. !!! note diff --git a/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/runtime-log.md b/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/runtime-log.md new file mode 100644 index 00000000000..e3033a9e0b4 --- /dev/null +++ b/docs-2.0/nebula-dashboard-ent/4.cluster-operator/cluster-information/runtime-log.md @@ -0,0 +1,22 @@ +# Runtime log + +DBAs and developers can use runtime logs to investigate and identify issues when the system malfunctions. Dashboard Enterprise Edition allows you to quickly view runtime logs. + +## Entry + +1. At the top navigation bar of the Dashboard Enterprise Edition page, click **Cluster Management**. +2. On the right side of the target cluster, click **Detail**. +3. On the left-side navigation bar of the page, click **Information**->**Runtime Log**. + +!!! note + + For the description of runtime log parameters, see [Runtime log](../../..//5.configurations-and-logs/2.log-management/logs.md). + +## View runtime log + +In the upper corner of the page, you can filter services or search for the log name. Click **View Log** in the **Operation** column. + +- Support copying all logs in the window with one click. +- Support copying the log file path. +- Support **Tail Mode** and **Range Mode** to view logs. You need to click **Refresh** after setting. +- Support searching logs by keywords (at least 3 characters). \ No newline at end of file diff --git a/docs-2.0/nebula-dashboard-ent/5.account-management.md b/docs-2.0/nebula-dashboard-ent/5.account-management.md index 13a65b8dc15..2452095bb5b 100644 --- a/docs-2.0/nebula-dashboard-ent/5.account-management.md +++ b/docs-2.0/nebula-dashboard-ent/5.account-management.md @@ -58,6 +58,10 @@ Accounts with `admin` roles can create other accounts. The steps are as follows: - Invite (LDAP or OAuth2.0 accounts): Set the invitee's account type, enterprise email and role. After the invitee clicks the **Accept** button in the email to activate the account, the invitee needs to click **Login** to automatically jump to the Dashboard Enterprise Edition login page. The invitee can log into Dashboard with his/her enterprise email account and password. + !!! note + + Automatic registration is also supported after LDAP is enabled. When you enter an unregistered account in LDAP mode on the login page, the Dashboard automatically registers the account, but the role permission is `user`. + - Create Account (general accounts): Set the login name, password, and role for the new account. For information about roles, see the above content. ## View accounts diff --git a/docs-2.0/nebula-dashboard-ent/system-settings/single-sign-on.md b/docs-2.0/nebula-dashboard-ent/system-settings/single-sign-on.md index 7993eb6ded2..60d5ea465c7 100644 --- a/docs-2.0/nebula-dashboard-ent/system-settings/single-sign-on.md +++ b/docs-2.0/nebula-dashboard-ent/system-settings/single-sign-on.md @@ -25,6 +25,14 @@ NebulaGraph Dashboard Enterprise Edition supports general accounts, LDAP account |`User Filter` | `&(objectClass=*)` | Set a filter to LDAP search queries. | |`Email Key` | `mail`| Set the field name used to restore email in LDAP. | +### Instruction + +After LDAP is enabled, you can register an LDAP account in two ways: + +- [Email invitation](../5.account-management.md): When creating an account on the **Members** page, you can invite others to register by email. The advantage is that you can set the role permissions of the account. + +- Automatic registration: When you enter an unregistered account in LDAP mode on the login page, the Dashboard automatically registers the account, but the [role permission](../5.account-management.md) is `user`. + ## OAuth2.0 configuration !!! caution @@ -49,3 +57,7 @@ NebulaGraph Dashboard Enterprise Edition supports general accounts, LDAP account |`Username Key` | `email`| The key of user name. | |`Organization` | `vesoft company` | The organization name. | |`Requested scopes for OAuth`| `email`| Scope of OAuth permissions. The scope of permissions needs to be a subset of the scope configured by the vendor's OAuth2.0 platform, otherwise, the request will fail. Make sure the `Username Key` is accessible within the requested scope. | + +### Instruction + +After OAuth2.0 is enabled, you can invite others to register by [email](../5.account-management.md). diff --git a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md index 2c42543b42b..cc29bc93192 100644 --- a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md +++ b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md @@ -12,6 +12,8 @@ Before connecting to the NebulaGraph database, you need to confirm the following - You have a NebulaGraph account and its password. +- We recommend you to use the Chrome browser of the version above 89. Otherwise, there may be compatibility issues. + ## OAuth2.0 Configuration !!! caution @@ -47,7 +49,17 @@ After the configuration is complete, restart the Explorer service. The OAuth aut To connect Explorer to NebulaGraph, follow these steps: -1. On the **Config Server** page of Explorer, configure these fields: +1. Type `http://:7002` in the address bar of your browser. + + The following login page shows that Explorer is successfully connected to NebulaGraph. + + ![NebulaGraph Explorer Login page](https://docs-cdn.nebula-graph.com.cn/figures/explorer_connect_230116_en.png) + + !!! note + + When logging into NebulaGraph Explorer for the first time, the content of *END USER LICENSE AGREEMENT* is displayed on the login page. Please read it and then click **I agree**. + +2. On the **Config Server** page of Explorer, configure these fields: - **Graphd IP address**: Enter the IP address of the Graph service of NebulaGraph. For example, `192.168.10.100`. @@ -66,7 +78,7 @@ To connect Explorer to NebulaGraph, follow these steps: - If authentication is enabled and different users are created and assigned roles, users in different roles log in with their accounts and passwords. -2. After the configuration, click the **Login** button. +3. After the configuration, click the **Login** button. !!! note diff --git a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md index 1c021f81561..a3d7016c83a 100644 --- a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md +++ b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md @@ -309,20 +309,6 @@ The Dag Controller can perform complex graph computing with NebulaGraph Analytic exec_file: /home/xxx/nebula-analytics/scripts/run_algo.sh ``` - - - - ## Next to do -When Explorer is started, use `http://:7002` to get access to Explorer. - -The following login page shows that Explorer is successfully connected to NebulaGraph. - -![NebulaGraph Explorer Login page](https://docs-cdn.nebula-graph.com.cn/figures/explorer_deploy.png) - -!!! note - - When logging into NebulaGraph Explorer for the first time, the content of *END USER LICENSE AGREEMENT* is displayed on the login page. Please read it and then click **I agree**. - -After entering the Explorer login interface, you need to connect to NebulaGraph. For more information, refer to [Connecting to the NebulaGraph](../deploy-connect/ex-ug-connect.md). +[Connect to Explorer](ex-ug-connect.md) diff --git a/docs-2.0/nebula-importer/use-importer.md b/docs-2.0/nebula-importer/use-importer.md index e5986a7c64a..9bbcc9fa392 100644 --- a/docs-2.0/nebula-importer/use-importer.md +++ b/docs-2.0/nebula-importer/use-importer.md @@ -214,6 +214,7 @@ files: withHeader: false withLabel: false delimiter: "," + lazyQuotes: false ``` |Parameter|Default value|Required|Description| @@ -229,6 +230,7 @@ files: |`files.csv.withHeader`|`false`|Yes|Whether there is a header.| |`files.csv.withLabel`|`false`|Yes|Whether there is a label.| |`files.csv.delimiter`|`","`|Yes|Specifies the delimiter for the CSV file. A string delimiter that supports only one character.| +|`lazyQuotes`|`false`|No|If `lazyQuotes` is true, a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field.| #### Schema configuration @@ -252,14 +254,23 @@ schema: - name: age type: int index: 2 + - name: name + type: string + index: 1 - name: gender type: string + - name: phone + type: string + nullable: true + - name: wechat + type: string + nullable: true + nullValue: "__NULL__" ``` |Parameter|Default value|Required|Description| |:---|:---|:---|:---| |`files.schema.type`|-|Yes|Schema type. Possible values are `vertex` and `edge`.| -|`files.schema.vertex.vid.type`|-|No|The data type of the vertex ID. Possible values are `int` and `string`.| |`files.schema.vertex.vid.index`|-|No|The vertex ID corresponds to the column number in the CSV file.| |`files.schema.vertex.vid.function`|-|No|Functions to generate the VIDs. Currently, we only support function `hash`.| |`files.schema.vertex.vid.prefix`|-|No|Add prefix to the original vid. When function is specified also, `prefix` is applied to the original vid before `function`.| @@ -267,6 +278,10 @@ schema: |`files.schema.vertex.tags.props.name`|-|Yes|Tag property name, which must match the Tag property in the NebulaGraph.| |`files.schema.vertex.tags.props.type`|-|Yes|Property data type, supporting `bool`,`int`,`float`,`double`,`string`,`time`,`timestamp`,`date`,`datetime`,`geography`,`geography(point)`,`geography(linestring)` and `geography(polygon)`.| |`files.schema.vertex.tags.props.index`|-|No|Property corresponds to the sequence number of the column in the CSV file.| +|`files.schema.vertex.tags.props.nullable`|`false`|No|Whether this prop property can be `NULL`, optional values is `true` or `false`.| +|`files.schema.vertex.tags.props.nullValue`|`""`|No|Ignored when nullable is false. The property is set to NULL when the value is equal to nullValue.| +|`files.schema.vertex.tags.props.alternativeIndices`|-|No| Ignored when `nullable` is `false`. When the property value is not `nullValue`, the value is fetched from csv according to the index sequence.| +|`files.schema.vertex.tags.props.defaultValue`|-|No| Ignored when `nullable` is false. The property default value, when all the values obtained by `index` and `alternativeIndices` are `nullValue`.| !!! note The sequence numbers of the columns in the CSV file start from 0, that is, the sequence numbers of the first column are 0, and the sequence numbers of the second column are 1. diff --git a/docs-2.0/reuse/source_connect-to-nebula-graph.md b/docs-2.0/reuse/source_connect-to-nebula-graph.md index a567981a416..4f595c39b26 100644 --- a/docs-2.0/reuse/source_connect-to-nebula-graph.md +++ b/docs-2.0/reuse/source_connect-to-nebula-graph.md @@ -71,7 +71,7 @@ NebulaGraph supports multiple types of clients, including a CLI client, a GUI cl | `-P/-port` | Sets the port number of the graphd service. The default port number is 9669. | | `-u/-user` | Sets the username of your NebulaGraph account. Before enabling authentication, you can use any existing username. The default username is `root`. | | `-p/-password` | Sets the password of your NebulaGraph account. Before enabling authentication, you can use any characters as the password. | - | `-t/-timeout` | Sets an integer-type timeout threshold of the connection. The unit is second. The default value is 120. | + | `-t/-timeout` | Sets an integer-type timeout threshold of the connection. The unit is millisecond. The default value is 120. | | `-e/-eval` | Sets a string-type nGQL statement. The nGQL statement is executed once the connection succeeds. The connection stops after the result is returned. | | `-f/-file` | Sets the path of an nGQL file. The nGQL statements in the file are executed once the connection succeeds. The result will be returned and the connection stops then. | | `-enable_ssl` | Enables SSL encryption when connecting to NebulaGraph. | diff --git a/mkdocs.yml b/mkdocs.yml index 234e825cb4c..2ede6f83cf5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -575,6 +575,7 @@ nav: - NebulaGraph Dashboard Enterprise Edition: - What is NebulaGraph Dashboard Enterprise Edition: nebula-dashboard-ent/1.what-is-dashboard-ent.md - Deploy Dashboard Enterprise Edition: nebula-dashboard-ent/2.deploy-connect-dashboard-ent.md + - Connect to Dashboard: nebula-dashboard-ent/3.connect-dashboard.md - NebulaGraph Dashboard Enterprise Edition license: nebula-dashboard-ent/11.dashboard-ent-license.md - Create and import clusters: - Create clusters: nebula-dashboard-ent/3.create-import-dashboard/1.create-cluster.md @@ -586,7 +587,9 @@ nav: - Information: - Information overview: nebula-dashboard-ent/4.cluster-operator/cluster-information/overview-info.md - Cluster diagnostics: nebula-dashboard-ent/4.cluster-operator/cluster-information/cluster-diagnosis.md -# - Job management: nebula-dashboard-ent/4.cluster-operator/cluster-information/job-management.md + - Job management: nebula-dashboard-ent/4.cluster-operator/cluster-information/job-management.md + - Audit log: nebula-dashboard-ent/4.cluster-operator/cluster-information/audit-log.md + - Runtime log: nebula-dashboard-ent/4.cluster-operator/cluster-information/runtime-log.md - Operation: - Node: nebula-dashboard-ent/4.cluster-operator/operator/node.md - Scale: nebula-dashboard-ent/4.cluster-operator/operator/scale.md