Commit Graph

90 Commits (80cd5e63af7c39ff111c91c7fdbcf0eb8bf49655)

Author SHA1 Message Date
Jason Wilder fadc227c93 Flush tab writer after each row
tab writer was flushed after all the rows were processed which consumed
a lot of memory and was very slow.
2016-07-26 10:17:58 -06:00
Cory LaNou 7ec80e05ce update influx inspect readme with DDL information 2016-07-25 14:09:53 -05:00
Cory LaNou 968d322d6d finish tsm file exporter 2016-07-21 17:20:51 -05:00
Jonathan A. Sternberg 2a1e6533b7 Rename dumptsmdev to dumptsm in influx_inspect
Removes the old implementation of `dumptsm`. It was for an older version
of the tsm1 files that is no longer used and now just panics when used
on a tsm1 file. dumptsmdev has been renamed to `dumptsm`, but the old
`dumptsmdev` command still works for compatibility.
2016-06-21 10:31:05 -05:00
Jonathan A. Sternberg 1d03151631 Remove FieldCodec from tsdb package
Updated `influx_inspect` to use the `FieldDimensions` method instead
(more reliable anyway). The `influx_tsm` program used its own vendored
copy of `FieldCodec` so it is not affected by this change. `FieldCodec`
was only used for the `b1` and `bz1` engines which were removed in 0.12,
but the code that created the field codec was never removed. This
limited the maximum number of fields to 255 even though that restriction
was removed with the `tsm1` engine.

Fixes #6869.
2016-06-19 21:38:43 -05:00
Todd Persen efdc54ac5d Display value according to type. 2016-05-02 22:08:15 -07:00
Todd Persen 318a966b94 Change `dump` to `export` 2016-05-02 21:42:42 -07:00
Todd Persen 1378b8a3c8 Dump TSM files to line protocol. 2016-04-29 23:01:18 -07:00
Jason Wilder c8bd41c2d8 Remove TSM reader Keys func
It's very inneficient and should never be used.
2016-04-27 13:09:52 -06:00
Jason Wilder a789e819a3 Remove NewTSMReaderWithOptions
There are two TSMIndex implementations, the directIndex and the
indirectIndex.  Originally, we only had the directIndex and later
added the indirectIndex and NewTSMReaderWithOptions in order to
allow both indexes to be used in tests and code.  This has created
a problem since we really only use the directIndex for writing and
always use the indirectIndex for reading.

This changes removes the NewTSMReaderWithOptions func so that it is
no longer possible to create a TSMReader with a directIndex.  This
will allow a lot of the block reading code used by the directIndex
to be removed and simplify maintainence.  It also gives better test
coverage of the code that is actually used by the TSM engine now.
2016-04-27 13:09:52 -06:00
Seif Lotfy 467bc6b269 Use TSMReaderOptions MMAP in verify cmd 2016-04-19 22:33:03 +02:00
Seif Lotfy c6e3c87e00 Add Block checksum validation and "influx_inspect verify" tool
Fixes #5502
2016-04-19 22:33:03 +02:00
Seif Lotfy 7a2dcd3131 Check FieldCodec f before calling FieldCoded.Fields()
If FieldCodec f == nil don't call FieldCoded.Fields().

Fixes #6294
2016-04-14 20:30:30 +02:00
Jason Wilder 8d70d65a82 Convert time.Time to int64 2016-02-25 15:15:01 -07:00
Joe LeGasse dc8ed7953d Remove custom binary-conversion functions
Also cleaned up some excess allocations, and other cruft from the code
2016-02-18 13:56:35 -05:00
Ben Johnson 5a0d1ab7c1 rename influxdb/influxdb to influxdata/influxdb
This commit changes all the import and URL references from:

    github.com/influxdb/influxdb

to:

    github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Jason Wilder 0264d77545 Fix block sizes reported by influx_inspect 2016-01-07 14:51:59 -07:00
Jason Wilder a38c95ec85 Update compactions to run concurrently
This has a few changes in it (unfortuantely).  The main change is to run compactions
concurrently.  While implementing this, a few query and performance bugs showed up that
are also fixed by this commit.
2015-12-23 18:01:11 -07:00
Jason Wilder 93d93797da Fix snappy decode error w/ influx_inspect 2015-12-16 11:28:13 -07:00
Jason Wilder 948973292b Update influx_inspect to handle min time removed from blocks 2015-12-07 15:42:36 -07:00
Paul Dix 1bee7d1512 Update TSM, remove old version, add config
* remove rolloverTSMFileSize constant that is no longer used
* remove the maxGenerationFileCount since it is no longer a limitation that's necessary with the new compaction scheme. We no longer read WAL segments as part of the compaction so memory is only used as we read in each individual key
* remove minFileCount and switch to a user configurable variable
* remove the mutex from WALSegmentWriter. There's never more than one open in the WAL at one time and it's not exported through any function so the lock on the WAL should be used. This simplified keeping track of the last write time and removed a bunch of unnecessary locks.
* update WALSegmentWriter.Write to take the compressed bytes so that encoding and compression can occur before the call to write (while we don't hold the WAL lock)
* remove a bunch of unnecessary locking in WAL.writeToLog
* Add check for TSM file magic number and vesion
* Remove old tsm, log, and unused cursor code
* Remove references to tsm1dev everywhere except in the inspector
* Clean up config options for compaction and snapshotting
* Remove old TSM configuration options
* Update the config.sample.toml with TSM options
* Update WAL compact to force if it has been cold for writes for a configurable period of time (1h by default)
2015-12-06 18:50:39 -05:00
Jason Wilder 41b24995a7 Compcation fixes 2015-12-05 12:19:28 -07:00
Jason Wilder c54a3da0ca Implement delete series/measurement 2015-12-04 09:10:26 -07:00
Jason Wilder a6541937f8 Add dumptsmdev to influx_inspect
Allow inspecting the updated TSM format.
2015-11-24 08:50:13 -07:00
Jason Wilder c4a6490d32 Update influx_inspect to use new DecodeBlock interface 2015-11-17 23:24:09 -07:00
Pablo Miranda b908cbb866 fix lint errors for cmd/...
corrects the initialize package comment for lint

brings c.ServerVersion back
2015-11-10 23:13:01 -08:00
Ben Johnson e9d303531e reuse tsm1 decode buffer
This commit changes `tsm1.DecodeBlock()` to reuse the same
slice of `[]tsm1.Value` instead of reallocating a new one each time.
2015-10-23 12:51:55 -06:00
Jason Wilder 1bcd8dd5de Handle reading partially written tsm files better
If a tsm file was partially written, we were not able to read the
raw block data because we panic/exited when reading the corrupted
index.  This allows us to read the raw blocks if we can.
2015-10-19 12:03:12 -06:00
Jason Wilder ae925625ce Merge pull request #4451 from influxdb/jw-int64
Int64 encoding enhancements
2015-10-15 13:44:55 -06:00
Jason Wilder 30364aa2b0 Remove dead code 2015-10-14 19:26:46 -06:00
Jason Wilder d3691425e0 Update influx_inspect to show RLE for int64 blocks 2015-10-14 19:24:04 -06:00
Jason Wilder 214e451af5 Move info command to separate file 2015-10-14 09:27:24 -06:00
Jason Wilder 4e9e3a4763 Shorten dumptsm flags 2015-10-14 09:24:54 -06:00
Jason Wilder bbe0eb49bc Add ability to filter index and block by key string match 2015-10-13 18:16:16 -06:00
Jason Wilder 467ada073a Add flags for dumping only index, block or all data 2015-10-13 17:47:37 -06:00
Jason Wilder 1a3f8c403e Re-work influx_inspect command-line options to use sub-commands
Should make adding new functionality easier.
2015-10-13 17:26:23 -06:00
Jason Wilder ad35dcea38 Handle case where IDs file is out of sync with tsm1 file or missing
Avoids a panic if a series ID exists in the tsm file but not in the IDs file.
Also handles the case were we don't have an ids file and just a tsm file.
2015-10-13 17:19:59 -06:00
Jason Wilder f58c283d8a Add some comments 2015-10-09 22:53:58 -06:00
Jason Wilder bc6d677b06 Add tsm file dump support to influx_inspect
This will read a tsm file and dump index, block and compression level info from the file.
It reads the file directly as opposed to reading it through the tsm engine which should
help with debugging and troubleshooting data file issues.

The implementation is not pretty but the output is very useful.  In the future, we can
add data extraction, recovery and verification functionality if needed.
2015-10-09 22:32:11 -06:00
Philip O'Toole 1e7a86aa61 Rename 'inspect' to 'influx_inspect' 2015-10-09 11:03:39 -07:00