Skip to content

doc(toolchain): sync tools with master - #475

Open
bitflicker64 wants to merge 1 commit into
apache:masterfrom
bitflicker64:doc-sync/toolchain-tools
Open

doc(toolchain): sync tools with master#475
bitflicker64 wants to merge 1 commit into
apache:masterfrom
bitflicker64:doc-sync/toolchain-tools

Conversation

@bitflicker64

Copy link
Copy Markdown
Contributor

Purpose of the PR

Sync the hugegraph-tools docs (en + cn) with hugegraph-toolchain master (3b385c3d).

The pages had drifted from the CLI: they documented a global option that is not registered, missed one global option and several sub-command options, listed options on the auth commands that do not exist there, and carried several wrong defaults. The usage block was also missing three graph sub-commands and both auth sub-commands.

Page What was wrong What changed Source on master
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md --protocol listed as a global option, but it is never registered on the main command Removed it; replaced with a note that the protocol comes from the --url scheme hugegraph-tools/src/main/java/org/apache/hugegraph/cmd/HugeGraphCommand.java:62-86, base/ToolClient.java:51
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md --throw-mode global option not documented Added it with its false default cmd/SubCommands.java:753-759
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md --trust-store-file / --trust-store-password had no stated constraint; --user / --password pairing not stated Added a note that the truststore options require an https --url, and that user and password must both be set or both omitted base/ToolClient.java:51-70, cmd/HugeGraphCommand.java:411-414
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md JAVA_HOME and JAVA_OPTIONS not mentioned Added a line describing both, including the computed -Xmx hugegraph-tools/assembly/bin/hugegraph:47-52, 136-143
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md graph-create --name default given as hugegraph, and --file marked required Default corrected to g; --file is optional and its content is sent as the graph config cmd/SubCommands.java:377-382, 831-837
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md graph-clone --name default given as hugegraph, and --clone-graph-name missing Default corrected to g; added --clone-graph-name with default hugegraph cmd/SubCommands.java:396-402
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md Nothing said about the timeout floor on the graph sub-commands Added a note that graph-create, graph-clone, graph-clear and graph-drop raise --timeout to at least 300 seconds cmd/HugeGraphCommand.java:55-56, 268, 277, 297, 306
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md Section 3.4 heading omitted task-cancel and task-clear Heading updated to list all five task sub-commands cmd/SubCommands.java:69-73
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md task-list --status had no value list; --limit had no positivity note; task-cancel --task-id not marked required Added the eight legal statuses, the positive-value rule, and the required marker manager/TasksManager.java:31-34, cmd/SubCommands.java:888-909, 1247-1257
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md --huge-types list omitted the schema value Added schema and what it expands to for backup, restore and migrate cmd/SubCommands.java:761-773, 1039-1054
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md --log default given as the current directory Corrected to ./logs cmd/SubCommands.java:638-640
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md --thread-num / -T missing from backup, restore, migrate and dump Added with the Math.min(10, Math.max(4, CPUs / 2)) default cmd/SubCommands.java:642-646, base/RetryManager.java:33-34
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md --split-size had no minimum Added the 1048576 (1M) minimum on backup, migrate and dump manager/BackupManager.java:110-113
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md backup --label described only as applying to vertex/edge backups Restated the enforced rule: --huge-types must name exactly one type, vertex or edge manager/BackupManager.java:98-105
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md Nothing said about the backup timeout floor Added a note that a --timeout below 120 seconds is raised to 120 for backup and for the backup step of migrate manager/BackupManager.java:67, cmd/HugeGraphCommand.java:188-190, 220-222
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md restore did not say which graph modes it requires Added a note that the graph must be in RESTORING or MERGING cmd/HugeGraphCommand.java:200-203, hugegraph-client/src/main/java/org/apache/hugegraph/structure/constant/GraphMode.java:85-87
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md migrate --graph-mode had no default and no note about the mode swap Added the RESTORING default and the switch-back behaviour cmd/SubCommands.java:310-314, cmd/HugeGraphCommand.java:236-255
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md schedule-backup --interval had no default, and the crontab behaviour was undocumented Added the "0 0 * * *" default plus a note on the crontab entry, the backup path, the retention and the relative-path rule cmd/SubCommands.java:102-119, assembly/bin/schedule-backup.sh:29-134, assembly/bin/backup.sh:29-37
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md dump --directory default given as the current directory Corrected to ./{graphName} locally and {fs.default.name}/{graphName} on HDFS cmd/SubCommands.java:632-636, base/LocalDirectory.java:138-142, base/HdfsDirectory.java:176-190
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md auth-backup / auth-restore listed --log and --thread-num, which they do not accept, and gave -d as a short form of --directory Removed both options and the -d short form; corrected the directory default to ./auth-backup-restore cmd/SubCommands.java:912-926
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md auth --types did not state the belong/access dependencies; --init-password condition was vague Added the dependency rules and the exact condition on --types containing user cmd/SubCommands.java:1003-1016, 1088-1097, manager/AuthBackupRestoreManager.java:228-233
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md deploy / start-all -v had no value list; clear did not describe its guards; the default download prefix was not named Added the version-map values, the running-process and prompt guards, and the default prefix assembly/bin/version-map.yaml:19-42, assembly/bin/deploy.sh:22, 76-80, assembly/bin/clear.sh:64-93
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md Nothing said that the install sub-commands bypass the Java CLI Added a note that deploy, start-all, clear and stop-all are handed to the shell scripts, so the global options do not apply assembly/bin/hugegraph:54-75
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md Usage block was missing graph-create, graph-clone, graph-drop, auth-backup and auth-restore, and carried stale option text and a typo Refreshed the block against the current parameter definitions cmd/SubCommands.java:59-93, 122-125, 215-218, 763-773
content/{en,cn}/docs/quickstart/toolchain/hugegraph-tools.md Build output described as hugegraph-tools-${version}.tar.gz, and the release-package layout was not given Corrected to apache-hugegraph-tools-${version}.tar.gz plus the unpacked directory, and added the path to the tools directory inside the toolchain package hugegraph-tools/pom.xml:34-38, 181-215, hugegraph-tools/assembly/descriptor/assembly.xml:18-48, hugegraph-dist/pom.xml:33-60
content/{en,cn}/docs/guides/backup-restore.md Server address given as http://127.0.0.1 Corrected to http://127.0.0.1:8080, the actual --url default cmd/SubCommands.java:694-697
content/{en,cn}/docs/guides/backup-restore.md Said backup works in "all three graph modes" and listed three modes for graph-mode-get There are four modes; backup does not check the mode at all, while restore requires RESTORING or MERGING hugegraph-client/src/main/java/org/apache/hugegraph/structure/constant/GraphMode.java:24-87, cmd/HugeGraphCommand.java:187-203

Scope note: only the hugegraph-tools parts of the backup/restore guide were touched.

Paths in the "Source on master" column are relative to hugegraph-tools/ unless stated otherwise.

Bring the hugegraph-tools pages (en and cn) back in line with the CLI on
toolchain master: drop the unregistered --protocol global, add --throw-mode,
fix the graph-create/graph-clone, --log, dump and auth directory defaults,
add the missing --thread-num option and the 'schema' type, drop --log and
--thread-num from the auth commands where they do not exist, document the
timeout floors and the schedule-backup, deploy and clear behaviour, and
refresh the usage block with the commands and text it was missing. Also
correct the graph modes and default url in the backup/restore guide.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: no. Summary: The deploy documentation advertises a default download prefix that does not resolve to a published server release. Evidence: verified against the exact-head docs, deploy.sh URL construction, version-map.yaml, and GitHub release metadata.

> 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 `~/hugegraph-download-url-prefix` file; if no address is specified later When -u and `~/hugegraph-download-url-prefix` are not specified, the tar package will be downloaded from the address specified by `~/hugegraph-download-url-prefix`; if there is neither -u nor `~/hugegraph-download-url-prefix`, it will be downloaded from the default download address
> deploy, start-all, clear and stop-all are handed by `bin/hugegraph` straight to the shell scripts `bin/deploy.sh`, `bin/start-all.sh`, `bin/clear.sh` and `bin/stop-all.sh`, so the global options and environment variables in 3.2 do not apply to them.

> 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 `~/hugegraph-download-url-prefix` file; if no address is specified later When -u and `~/hugegraph-download-url-prefix` are not specified, the tar package will be downloaded from the address specified by `~/hugegraph-download-url-prefix`; if there is neither -u nor `~/hugegraph-download-url-prefix`, it will be downloaded from the default download address `https://github.com/hugegraph`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Important: This newly documented default is not a usable release source for the versions accepted by deploy. deploy.sh combines it with /hugegraph/releases/download/v${SERVER_VERSION}/...; for -v 0.8 that resolves to https://github.com/hugegraph/hugegraph/releases/download/v0.8.0/hugegraph-0.8.0.tar.gz, but that release is not published there. Please fix the script or document a verified download prefix/URL before advertising this default, and mirror the correction in the Chinese page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants