From c90edd4a25027c9ab5bb36cb6813a14aafe2de88 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 23 Aug 2019 15:49:11 -0600 Subject: [PATCH 1/3] added the influxd inspect dumpwal command, resolves #302 --- .../reference/cli/influxd/inspect/_index.md | 1 + .../reference/cli/influxd/inspect/dumpwal.md | 68 +++++++++++++++++++ .../cli/influxd/inspect/export-blocks.md | 2 +- .../cli/influxd/inspect/verify-tsm.md | 2 +- 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 content/v2.0/reference/cli/influxd/inspect/dumpwal.md diff --git a/content/v2.0/reference/cli/influxd/inspect/_index.md b/content/v2.0/reference/cli/influxd/inspect/_index.md index a084789d6..04500ddaa 100644 --- a/content/v2.0/reference/cli/influxd/inspect/_index.md +++ b/content/v2.0/reference/cli/influxd/inspect/_index.md @@ -18,6 +18,7 @@ influxd inspect [subcommand] ## Subcommands | Subcommand | Description | |:---------- |:----------- | +| [dumpwal](/v2.0/reference/cli/influxd/inspect/dumpwal/) | Output TSM data from WAL files | | [export-blocks](/v2.0/reference/cli/influxd/inspect/export-blocks/) | Export block data | | [report-tsi](/v2.0/reference/cli/influxd/inspect/report-tsi/) | Report the cardinality of TSI files | | [report-tsm](/v2.0/reference/cli/influxd/inspect/report-tsm/) | Run TSM report | diff --git a/content/v2.0/reference/cli/influxd/inspect/dumpwal.md b/content/v2.0/reference/cli/influxd/inspect/dumpwal.md new file mode 100644 index 000000000..bc1747239 --- /dev/null +++ b/content/v2.0/reference/cli/influxd/inspect/dumpwal.md @@ -0,0 +1,68 @@ +--- +title: influxd inspect dumpwal +description: > + The `influxd inspect dumpwal` command outputs data from WAL files. +v2.0/tags: [wal, inspect] +menu: + v2_0_ref: + parent: influxd inspect +weight: 301 +--- + +The `influxd inspect dumpwal` command outputs data from Write Ahead Log (WAL) files. +Given a list of file path globs (patterns which match `.wal` file paths), +the command parses and prints out entries in each file. + +## Usage +```sh +influxd inspect dumpwal [flags] +``` + +## Output details +The `--find-duplicates` flag determines the output of `influxd inspect dumpwal` command. + +**Without `--find-duplicates`**, the command outputs the following for each file +that matches the specified [globbing patterns](#globbing-patterns): + +- The file name +- For each entry in a file: + - The type of the entry (`[write]` or `[delete-bucket-range]`) + - The formatted entry contents + +**With `--find-duplicates`**, the command outputs the following for each file +that matches the specified [globbing patterns](#globbing-patterns): + +- The file name +- A list of keys in the file with out of order timestamps + +## Arguments + +### Globbing patterns +Globbing patterns provide partial paths used to match file paths and names. + +##### Example globbing patterns +```sh +# Match any file or folder starting with "foo" +foo* + +# Match any file or folder starting with "foo" and ending with .txt +foo*.txt + +# Match any file or folder ending with "foo" +*foo + +# Match foo/bar/baz but not foo/bar/bin/baz +foo/*/baz + +# Match foo/baz and foo/bar/baz and foo/bar/bin/baz +foo/**/baz + +# Matches cat but not can or c/t +/c?t +``` + +## Flags +| Flag | Description | +|:---- |:----------- | +| `--find-duplicates` | Ignore dumping entries; only report keys in the WAL that are out of order. | +| `-h`, `--help` | Help for `dumpwal`. | diff --git a/content/v2.0/reference/cli/influxd/inspect/export-blocks.md b/content/v2.0/reference/cli/influxd/inspect/export-blocks.md index dbd848b26..18f187d30 100644 --- a/content/v2.0/reference/cli/influxd/inspect/export-blocks.md +++ b/content/v2.0/reference/cli/influxd/inspect/export-blocks.md @@ -3,7 +3,7 @@ title: influxd inspect export-blocks description: > The `influxd inspect export-blocks` command exports all blocks in one or more TSM1 files to another format for easier inspection and debugging. -v2.0/tags: [wal, inspect] +v2.0/tags: [inspect] menu: v2_0_ref: parent: influxd inspect diff --git a/content/v2.0/reference/cli/influxd/inspect/verify-tsm.md b/content/v2.0/reference/cli/influxd/inspect/verify-tsm.md index cd8ad2f4b..e2c5cac84 100644 --- a/content/v2.0/reference/cli/influxd/inspect/verify-tsm.md +++ b/content/v2.0/reference/cli/influxd/inspect/verify-tsm.md @@ -3,7 +3,7 @@ title: influxd inspect verify-tsm description: > The `influxd inspect verify-tsm` command analyzes a set of TSM files for inconsistencies between the TSM index and the blocks. -v2.0/tags: [wal, inspect] +v2.0/tags: [tsm, inspect] menu: v2_0_ref: parent: influxd inspect From 083e6763a8fd710643450c7bc3e0d4ca771f0d6c Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 23 Aug 2019 16:32:02 -0600 Subject: [PATCH 2/3] updated dumpwal command to address PR feedback --- content/v2.0/reference/cli/influxd/inspect/dumpwal.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/v2.0/reference/cli/influxd/inspect/dumpwal.md b/content/v2.0/reference/cli/influxd/inspect/dumpwal.md index bc1747239..d5221fca4 100644 --- a/content/v2.0/reference/cli/influxd/inspect/dumpwal.md +++ b/content/v2.0/reference/cli/influxd/inspect/dumpwal.md @@ -10,7 +10,7 @@ weight: 301 --- The `influxd inspect dumpwal` command outputs data from Write Ahead Log (WAL) files. -Given a list of file path globs (patterns which match `.wal` file paths), +Given a list of file path globs (patterns that match `.wal` file paths), the command parses and prints out entries in each file. ## Usage @@ -19,7 +19,7 @@ influxd inspect dumpwal [flags] ``` ## Output details -The `--find-duplicates` flag determines the output of `influxd inspect dumpwal` command. +The `--find-duplicates` flag determines the `influxd inspect dumpwal` output. **Without `--find-duplicates`**, the command outputs the following for each file that matches the specified [globbing patterns](#globbing-patterns): @@ -33,7 +33,7 @@ that matches the specified [globbing patterns](#globbing-patterns): that matches the specified [globbing patterns](#globbing-patterns): - The file name -- A list of keys in the file with out of order timestamps +- A list of keys with timestamps in the wrong order in the file ## Arguments From 3db50eb5bb018b957f64da62e54cf40a0459e115 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 23 Aug 2019 16:37:21 -0600 Subject: [PATCH 3/3] minor update to dumpwal command --- content/v2.0/reference/cli/influxd/inspect/dumpwal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/v2.0/reference/cli/influxd/inspect/dumpwal.md b/content/v2.0/reference/cli/influxd/inspect/dumpwal.md index d5221fca4..854226983 100644 --- a/content/v2.0/reference/cli/influxd/inspect/dumpwal.md +++ b/content/v2.0/reference/cli/influxd/inspect/dumpwal.md @@ -33,7 +33,7 @@ that matches the specified [globbing patterns](#globbing-patterns): that matches the specified [globbing patterns](#globbing-patterns): - The file name -- A list of keys with timestamps in the wrong order in the file +- A list of keys with timestamps in the wrong order ## Arguments