From 6e61497c0e920e28e3c42d95b797e0e1c2d1d8ad Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Fri, 28 Jul 2023 11:27:27 +0800 Subject: [PATCH] importer updates --- docs-2.0/nebula-importer/use-importer.md | 50 ++++++++++++------- .../8.4.manage-running-logs.md | 2 +- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/docs-2.0/nebula-importer/use-importer.md b/docs-2.0/nebula-importer/use-importer.md index a20b9d6b3d1..dd78b0958ef 100644 --- a/docs-2.0/nebula-importer/use-importer.md +++ b/docs-2.0/nebula-importer/use-importer.md @@ -40,16 +40,20 @@ Prepare the CSV file to be imported and configure the YAML file to use the tool !!! note - For details about the YAML configuration file, see configuration file description at the end of topic. + For details about the YAML configuration file, see [Configuration File Description](#configuration_file_description) at the end of topic. ### Download binary package and run 1. Download the executable [binary package](https://github.com/vesoft-inc/nebula-importer/releases/tag/{{importer.tag}}). -2. Start the service. + !!! note + + The file installation path based on the RPM/DEB package is `/usr/bin/nebula-importer`. + +2. Under the directory where the binary file is located, run the following command to start importing data. ```bash - $ ./ --config + ./ --config ``` ### Source code compile and run @@ -59,7 +63,7 @@ Compiling the source code requires deploying a Golang environment. For details, 1. Clone repository. ```bash - $ git clone -b {{importer.branch}} https://github.com/vesoft-inc/nebula-importer.git + git clone -b {{importer.branch}} https://github.com/vesoft-inc/nebula-importer.git ``` !!! note @@ -69,19 +73,19 @@ Compiling the source code requires deploying a Golang environment. For details, 2. Access the directory `nebula-importer`. ```bash - $ cd nebula-importer + cd nebula-importer ``` 3. Compile the source code. ```bash - $ make build + make build ``` 4. Start the service. ```bash - $ ./bin/nebula-importer --config + ./bin/nebula-importer --config ``` ### Run in Docker mode @@ -89,25 +93,37 @@ Compiling the source code requires deploying a Golang environment. For details, Instead of installing the Go locale locally, you can use Docker to pull the [image](https://hub.docker.com/r/vesoft/nebula-importer) of the NebulaGraph Importer and mount the local configuration file and CSV data file into the container. The command is as follows: ```bash -$ docker pull vesoft/nebula-importer -$ docker run --rm -ti \ +docker pull vesoft/nebula-importer: +docker run --rm -ti \ --network=host \ -v : \ -v : \ - vesoft/nebula-importer: + vesoft/nebula-importer: \ --config ``` - ``: The absolute path to the YAML configuration file. -- ``: The absolute path to the CSV data file. If the file is not local, ignore this parameter. +- ``: The absolute path to the CSV data file. If the file is not local, ignore this parameter. - ``: NebulaGraph 3.x Please fill in 'v3'. !!! note A relative path is recommended. If you use a local absolute path, check that the path maps to the path in the Docker. +Example: + +```bash +docker pull vesoft/nebula-importer:v4 +docker run --rm -ti \ + --network=host \ + -v /home/user/config.yaml:/home/user/config.yaml \ + -v /home/user/data:/home/user/data \ + vesoft/nebula-importer:v4 \ + --config /home/user/config.yaml +``` + ## Configuration File Description -Various example configuration files are available within the [Github](https://github.com/vesoft-inc/nebula-ng-tools/tree/{{importer.branch}}/importer/examples) of the NebulaGraph Importer. The configuration files are used to describe information about the files to be imported, {{nebula.name}} server information, etc. The following section describes the fields within the configuration file in categories. +Various example configuration files are available within the [Github](https://github.com/vesoft-inc/nebula-importer/tree/{{importer.branch}}/examples) of the NebulaGraph Importer. The configuration files are used to describe information about the files to be imported, {{nebula.name}} server information, etc. The following section describes the fields within the configuration file in categories. !!! note @@ -162,9 +178,9 @@ manager: - UPDATE CONFIGS storage:rocksdb_column_family_options = { disable_auto_compactions = true }; - statements: - | - DROP SPACE IF EXISTS basic_int_examples; - CREATE SPACE IF NOT EXISTS basic_int_examples(partition_num=5, replica_factor=1, vid_type=int); - USE basic_int_examples; + DROP SPACE IF EXISTS basic_string_examples; + CREATE SPACE IF NOT EXISTS basic_string_examples(partition_num=5, replica_factor=1, vid_type=int); + USE basic_string_examples; wait: 10s after: - statements: @@ -204,11 +220,11 @@ log: |:---|:---|:---|:---| |`log.level`|`INFO`|No| Specifies the log level. Optional values are `DEBUG`, `INFO`, `WARN`, `ERROR`, `PANIC`, `FATAL`.| |`log.console`|`true`|No| Whether to print the logs to console synchronously when storing logs.| -|`log.files`|-|No|The log file path.| +|`log.files`|-|No|The log file path. The log directory must exist.| ### Source configuration -The Source configuration requires configuration of data source information, data processing methods, and Schema mapping. +The Source configuration requires the configuration of data source information, data processing methods, and Schema mapping. The example configuration is as follows: diff --git a/docs-2.0/nebula-operator/8.custom-cluster-configurations/8.4.manage-running-logs.md b/docs-2.0/nebula-operator/8.custom-cluster-configurations/8.4.manage-running-logs.md index 5469992ef9b..78a117acd8c 100644 --- a/docs-2.0/nebula-operator/8.custom-cluster-configurations/8.4.manage-running-logs.md +++ b/docs-2.0/nebula-operator/8.custom-cluster-configurations/8.4.manage-running-logs.md @@ -35,7 +35,7 @@ In the YAML configuration file of the cluster instance, you can configure log ro spec: graphd: config: - # Whether to include a timestamp in the log file name. "true" means yes, "false" means no. + # Whether to include a timestamp in the log file name. "true" means yes, "false" means no. It is "true" by default. "timestamp_in_logfile_name": "false" metad: config: