bitflicker64 opened a new pull request, #475:
URL: https://github.com/apache/hugegraph-doc/pull/475
## 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]