Merge pull request #407 from influxdata/cli/dumpwal

Add 'influxd inspect dumpwal' command
pull/465/head
Scott Anderson 2019-08-23 16:45:50 -06:00 committed by GitHub
commit 44609d34fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 2 deletions

View File

@ -19,6 +19,7 @@ influxd inspect [subcommand]
| Subcommand | Description |
|:---------- |:----------- |
| [dump-tsi](/v2.0/reference/cli/influxd/inspect/dump-tsi/) | Output low level TSI information |
| [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 |

View File

@ -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 that match `.wal` file paths),
the command parses and prints out entries in each file.
## Usage
```sh
influxd inspect dumpwal [flags] <globbing-patterns>
```
## Output details
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):
- 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 with timestamps in the wrong order
## 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`. |

View File

@ -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

View File

@ -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