Commit Graph

84 Commits (56d184f80c6baa83b143235172110f251e0bdd48)

Author SHA1 Message Date
Carol (Nichols || Goulding) 6223cbdc99 feat: Add an authorization token to all client requests
Connects to influxdata/fusion#59. Delorean currently ignores this
header.

Also add an example of using this to connect to an InfluxDB 2 instance;
I tested this out with a locally running Influx DB 2 and I was able to
write points!
2020-09-02 10:33:45 -04:00
Carol (Nichols || Goulding) 5f49543fdf feat: Support storage of points with String and Boolean fields 2020-08-14 10:57:20 -04:00
Carol (Nichols || Goulding) d59702ec79 feat: Make the create bucket HTTP API match the Influx 2.0 API
The `/api/v2/create_bucket` API was delorean-specific for testing
purposes. This change makes it match the [Influx 2.0 API][influx] and
adds a method to the client for creating buckets.

The client will always send an empty array of `retentionRules` because
that is a required parameter for the Influx API. Delorean always ignores
`retentionRules`. The `description` and `rp` parameters are optional and
are never sent.

[influx]: https://v2.docs.influxdata.com/v2.0/api/#operation/PostBuckets

I believe the gRPC create bucket is also delorean-specific and perhaps
not needed, but I'm leaving it in for now with a note.
2020-08-12 10:08:32 -04:00
Carol (Nichols || Goulding) e15efb71cf test: Have the end-to-end test use DataPoint from the influx client
This is revealing a bug in the client
2020-07-27 14:03:06 -04:00
Carol (Nichols || Goulding) 876796a59d refactor: Remove duplication by having write call write_line_protocol 2020-07-22 17:03:29 -04:00
Carol (Nichols || Goulding) 879b981897 refactor: Rename write methods to clarify their uses 2020-07-22 17:03:29 -04:00
Andrew Lamb 143c350ecb
Merge pull request #250 from influxdata/alamb/feat-multi-col-stats
feat: Update stats command to handle directories of files
2020-07-20 16:48:31 -04:00
Carol (Nichols || Goulding) bfd0f30152 test: Avoid an allocation and have a consistent API
This is temporary until we have a better point-building method anyway.
2020-07-17 17:14:20 -04:00
alamb ca1bd79902 feat: Update stats command to handle directories of files 2020-07-17 16:47:11 -04:00
Carol (Nichols || Goulding) 668aefae9b feat: Implement a rudimentary write API in the influx client 2020-07-17 10:28:19 -04:00
Carol (Nichols || Goulding) b1ce3958e5 fix: Define a fully-featured error for the Id type 2020-07-16 20:30:54 -04:00
Carol (Nichols || Goulding) 5afc3a1e3b fix: Ignore anything in the WAL dir that doesn't parse as an Org ID instead of crashing 2020-07-16 11:28:57 -04:00
Andrew Lamb 6ee72e5733
Merge pull request #239 from influxdata/alamb/less-chatty
fix: Make default output of delorean less chatty
2020-07-10 06:59:54 -04:00
alamb d1e334f3fe fix: Make default output of delorean less chatty 2020-07-08 18:02:48 -04:00
Edd Robinson 50ef521e6c feat: add support for converting multiple TSM files
This commit extends the ingest crate to support converting multiple TSM
files to a single Parquet file by merging identical measurements across
the TSM files.

This does not yet support merging blocks that overlap.
2020-07-08 22:57:15 +01:00
Jake Goulding 0deb608207 fix: Use correct route to ping 2020-07-03 15:35:04 -04:00
alamb 5f045fd9da fix: more cleanup 2020-07-03 07:01:22 -04:00
alamb 5fad7db0ac feat: Add better error handling and logging for http_routes 2020-07-01 16:08:49 -04:00
Andrew Lamb b5a91fae36
Merge pull request #207 from influxdata/alamb/faster-test-harness
fix: speed up end-to-end test harness so it polls rather than waits; Add PING route
2020-07-01 12:46:05 -04:00
alamb 6021ddd222 fix: more PR feedback 2020-07-01 12:41:59 -04:00
alamb 1f61fd820b fix: style cleanup 2020-07-01 12:31:42 -04:00
Andrew Lamb d16aec7e80
fix: Update tests/end-to-end.rs
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-07-01 12:29:17 -04:00
alamb d7ddcfa92f fix: fixup errors introduced during PR comments 2020-07-01 08:44:24 -04:00
Andrew Lamb f608bf4f0f
fix: Update tests/end-to-end.rs
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-07-01 08:41:21 -04:00
Andrew Lamb 6b71fcacde
fix: Apply suggestions from code review
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-07-01 08:39:56 -04:00
alamb 8be278aadd fix: speed up end-to-end test harness so it polls rather than waits 2020-06-30 12:21:25 -04:00
alamb dc8d655486 feat: Implement CapabilitiesResponse 2020-06-30 11:17:45 -04:00
Carol (Nichols || Goulding) c6f2508abe fix: Use clap's possible_values method
This gets us built-in help text and error messages, and does less work
before failing because of an unsupported value.

Before this change, the help text was:

```
OPTIONS:
        --compression-level <compression_level>
            Compression level: max or compatibility (default). [default: compatibility]
```

After this change, the help text is:

```
OPTIONS:
        --compression-level <compression_level>
            How much to compress the output data. 'max' compresses the most; 'compatibility' compresses in a manner more
            likely to be readable by other tools. [default: compatibility]  [possible values: max, compatibility]
```

Before this change, if you supplied an unsupported value, the error was:

```
[2020-06-29T14:47:42Z INFO  delorean::commands::convert] convert starting
[2020-06-29T14:47:42Z INFO  delorean::commands::convert] Preparing to convert 591 bytes from tests/fixtures/lineproto/temperature.lp
Conversion failed: Error creating a parquet table writer Unknown compression level 'foo'. Valid options 'max' or 'compatibility'
```

After this change, the error is:

```
error: 'foo' isn't a valid value for '--compression-level <compression_level>'
	[possible values: compatibility, max]
```
2020-06-29 10:53:01 -04:00
alamb c35b0e835c fix: clippy 2020-06-29 10:25:43 -04:00
alamb e8a0233b09 feat: add configurable compression level 2020-06-29 10:25:43 -04:00
alamb 511d2b6436 refactor: move benchmark test data to tests/fixtures 2020-06-26 17:41:37 -04:00
Jake Goulding 672afa1195 refactor: Merge unknown and missing extension errors 2020-06-26 16:07:35 -04:00
Jake Goulding aca63b68b2 refactor: Use more unique errors for the commands 2020-06-26 16:01:59 -04:00
Jake Goulding bca4d00716 refactor: use SNAFU more idiomatically in command modules 2020-06-26 13:26:51 -04:00
Edd Robinson 99268f5260 test: add coverage for converting tsm file 2020-06-26 11:50:37 +01:00
Andrew Lamb 322a491b9d
perf: Improve line protocol --> parquet conversion performance by ~20% (#177)
* feat: benchmark for lp->parquet performance

* feat: improve parser performance by storing contiguous EscapedStr

* fix: remove all string copies during LP-Parquet conversion

* refactor: Implement from_str as From<&str> only

* refactor: implement Deref instead of as_str

* refactor: Remove ends_with because Deref now makes it work

* refactor: Eq can be derived

* refactor: Remove unused From implementation

* refactor: Replace single-character strings with chars as requested by clippy

Co-authored-by: Carol (Nichols || Goulding) <carol.nichols@integer32.com>
2020-06-23 05:42:19 -04:00
Edd Robinson e507183fbd refactor: cleanup + clippy 2020-06-22 18:56:17 +01:00
Andrew Lamb 506a7f19d5
feat: add stats command for computing storage statistics (#160)
* feat: add stats command for computing storage statistics

* fix: Make function name less redundant

* fix: Apply suggestions from code review

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

* fix: remove changes to Cargo.lock

* fix: Cleanup to use `impl Into<String>` rather than String::from

* fix: fmt

* fix: less mut builder

* fix: fmt

* fix: clippy/fmt

* fix: fixup test

* fix: remove dstool reference

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-06-22 07:33:52 -04:00
Carol (Nichols || Goulding) 78c2fb99ac refactor: Remove all references to 'dstool'
Since it got merged into the main `delorean` binary.
2020-06-19 11:08:59 -04:00
Andrew Lamb a106e55fa6
feat: Add parquet metadata dumping (#159)
* feat: Add parquet metadata dumping

* fix: Update delorean_parquet/src/error.rs

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-06-18 18:34:49 -04:00
Andrew Lamb 91de50a3a7
refactor: Refactor convert command code to have a place for TSM (#164) 2020-06-18 09:57:54 -04:00
Andrew Lamb abb3338483
test: add an end to end test for writing multiple parquet files (#145)
* test: add an end to end test for writing multiple parquet files

* fix: whitespace ocd
2020-06-15 07:12:16 -04:00
Andrew Lamb d9278263a7
feat: write multiple measurements to multiple parquet files (#138)
* feat: write to a directory of parquet files

* feat: change LineProtocolConverter to push style, move sampling there

* feat: full push mode, write to multiple measurements

* fix: clarify comments on finalize

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* fix: clippy/fmt

* fix: remove whitespace

* fix: Apply suggestions from code review

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

* fix: fmt

* fix: make it compile again

* fix: fixup comments

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

* fix: remove unecessary debug implementation

* fix: cleaner comment

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

* fix: clearer iterator name

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

* fix: Apply suggestions from code review

Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

* fix: clean

* fix: make it compile

* fix: type fix

* fix: whitespace

* fix: more review comments

* fix: more review comments

* fix: code review comments + fmt

* fix: clippy

* fix: Use EscapedStr directly for performance

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-06-12 17:19:35 -04:00
Andrew Lamb faf3f534ac
refactor: move all dstool code into delorean binary (#131)
* refactor: move all dstool code into delorean binary

* fix: Move code/mods to make it compile and run

* fix: warn if db dir does not exist

* refactor: Match argument subcommands w/ more idomatic  rust

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

fix: restore hyper logging

fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>

* fix: update expected code

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
2020-06-10 16:04:46 -04:00
Andrew Lamb 81810c2faa
fix: rename measurement.txt to measurement.lp for consistency (#122)
* fix: rename measurement.txt to measurement.lp for consistency

* fix: rename the file
2020-06-05 17:28:06 -04:00
Andrew Lamb e0c38d0976
chore: Add test to check for tsm reading errors, update doc example (#117)
* chore: Add a test that decodes the entire tsm index

* fix: update test and change example to not use hard coded len

* fix: comment cleanup

* fix: clippy

* fix: Apply suggestions from code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>

* fix: fmt/clippy after code review

Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2020-06-05 16:22:56 -04:00
Jake Goulding 68fb580b43
style: Re-enable the elided lifetimes lint and move generated types to their own crate (#119)
* refactor: rename the module containing generated types

The nested `delorean` was confusing anyway, and this will make more
sense when we extract a new crate.

* refactor: Move the generated types to their own crate

This allows us to have more lax warnings in that crate alone, keeping
the main crate more strict.

* style: Re-enable elided lifetimes lint in the main crate
2020-06-05 16:22:27 -04:00
Edd Robinson 413738a264 feat: support org and bucket ID in entries 2020-06-04 14:36:43 +01:00
Andrew Lamb 18b05ce9ef
fix: move test of dstool to its delorean_storage_tool package (#107) 2020-06-02 16:10:30 -04:00
Andrew Lamb fbc74348c6
fix: consistent capitalization and data location (#105) 2020-06-02 08:00:13 -04:00