Commit Graph

1688 Commits (f97f5bcc82e6434d2bb4cbc39d3f64c11e4cfd06)

Author SHA1 Message Date
Jonathan A. Sternberg 87f7c66b8a Merge pull request #7119 from influxdata/js-create-database-use-defaults
Use defaults from `meta` package for `CREATE DATABASE`
2016-08-11 10:34:22 -05:00
Jonathan A. Sternberg ab049d7f0a Support mixed duration units
It is now possible to use a mixed duration unit like `1h30m`. The
duration units can be in whatever order as long as they are connected to
each other.

There is a change to the scanner. A token such as `10x` will be scanned
as a duration literal, but will then fail to parse as an invalid
duration. This should not be a breaking change as there is no situation
where `10m10` was a valid order of tokens for the parser.

Fixes #3634.
2016-08-10 13:34:19 -05:00
Jonathan A. Sternberg 530b00bd76 Use defaults from `meta` package for `CREATE DATABASE`
Instead of having the parser set the defaults, the command will set the
defaults so that the constants for that are actually used. This way we
can also identify which things the user provided and which ones we are
filling with default values.

This allows the meta client to be able to make smarter decisions when
determining if the user requested a conflict or if the requested
capabilities match with what is currently available. If you just say
`CREATE DATABASE WITH NAME myrp`, the user doesn't really care what the
duration of the retention policy is and just wants to use the default.
Now, we can use that information to determine if an existing retention
policy would conflict with what the user requested rather than returning
an error if a default value ever gets changed since the meta client
command can communicate intent more easily.
2016-08-09 12:00:06 -05:00
Ben Johnson 55b3e63ced
concurrent series limit
This commit fixes the `MaxSelectSeriesN` limit which was broken by
the implementation of lazy iterators. The setting previously limited
the total number of series but the new implementation limits the
concurrent number of series being processed.
2016-08-09 08:58:01 -06:00
Mark Rushakoff 7787703ca8 Ensure gzip writer closed in influx_inspect export
Previously, the gzip writer may have had unflushed data when the
underlying writer was closed, and the output stream would have been
truncated early.
2016-08-08 08:52:22 -07:00
Jonathan A. Sternberg 4a89ab4482 Merge pull request #6815 from influxdata/js-content-type-response-writer
Setup an interface for writing http responses based on the Content-Type header
2016-07-29 13:28:37 -05:00
Jonathan A. Sternberg d85072ada9 Setup an interface for writing http responses based on the Content-Type header
Only `application/json` is supported right now, but this opens up the
easier possibility of additional content types to be returned from the
server.
2016-07-29 13:11:51 -05:00
Cory LaNou 1117526873 remove IF EXISTS/IF NOT EXISTS from influxql language 2016-07-29 12:58:05 -05:00
Cory LaNou ae4a1a4d00 Merge pull request #7049 from influxdata/cjl-influx-inspect-doc-update
Update influx inspect readme with DDL information
2016-07-28 18:19:12 -05:00
Jonathan A. Sternberg 23ef9484a4 Support wildcards in aggregate functions 2016-07-28 17:56:32 -05:00
Jason Wilder 6bee354530 Add Load Time column 2016-07-26 10:23:45 -06:00
Jason Wilder 78cfe441aa Skip TSM files that fail to load
This can be used a quick way to determine if any TSM files are
corrupted.
2016-07-26 10:23:44 -06:00
Jason Wilder 5bdc01a3b2 Replace info w/ report command
info was not safe to run and not really useful.
2016-07-26 10:23:44 -06:00
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
Cory LaNou 8871f5bf8c update connection settings when changing hosts in cli 2016-07-08 11:35:42 -05:00
Jonathan A. Sternberg 036bf7d2d1 Allow any variant of the help option to trigger the help 2016-07-07 16:54:26 -05:00
Jonathan A. Sternberg bd24dc7135 Merge pull request #6970 from influxdata/js-6968-load-default-configuration-file
Always use the demo config when outputting a new config
2016-07-07 16:51:08 -05:00
Jonathan A. Sternberg ad97903a20 Always use the demo config when outputting a new config
Updating the help formatting for all of the commands for consistency.
Removed tabs from the output in favor of using spaces so it is more
clear how the output is intended to look.
2016-07-07 16:29:24 -05:00
Jonathan A. Sternberg 837a9804cf Refactoring the monitor service to avoid expvar
Truncate the time interval output of the monitor service to be on even
time intervals rather than on every minute based on the start time. This
normalizes the output from the monitor service.
2016-07-07 11:13:58 -05:00
Jonathan A. Sternberg b12f2c829b The data only build tag is no longer used
Removing the data only build tag because it is no longer used. It was
previously used for building a data only node from the open source build
that could be used in clustering, but all of the RPC code was removed
since the separation was too much of a hindrance on development whenever
we found a bug.

Since the original purpose of this is now useless, there's no point in
having a confusing build tag around.
2016-07-02 17:44:34 -05:00
Jonathan A. Sternberg 3bd51d3537 Fix fill(previous) when used with math operators 2016-06-29 09:54:12 -05:00
Cameron Sparr 98360c50d5 Trim BOM from config file for windows support
Default windows text editor (Notepad) adds a BOM to the beginning of the
file. This needs to be trimmed otherwise we will get an "invalid toml"
error.

see https://github.com/influxdata/telegraf/issues/1378
and http://utf8everywhere.org/#faq.boms
2016-06-24 07:50:13 +01:00
Jonathan A. Sternberg b8e52ce39a Merge pull request #6889 from influxdata/js-update-config-options
Update help and remove unused config options from the configuration file
2016-06-23 11:49:10 -05:00
Jack Zampolin e39dcaf8f0 Clean up code, fix struct and file names to fit with golang convention 2016-06-22 13:13:36 -07:00
Jonathan A. Sternberg 1d20498273 Allow a non-admin to call "use" for the influx cli
Previously, a non-admin could not call "use" in the influx cli since the
`SHOW DATABASES` command requires admin permissions to run. The correct
solution to this is likely to allow non-admins to call `SHOW DATABASES`,
but only see the databases they should be capable of seeing.

Since we don't have this kind of fine-grained authorization yet and
plans for it are still in the works, we do need someway to not
arbitrarily cripple non-admins attempting to use the cli program. This
is a temporary solution that will ignore any authorization errors from
`SHOW DATABASES` if authorization has been set. A warning message will
be printed and the database will be switched. This should be enough to
ensure that there is some warning that you may not have switched to a
valid database while not crippling non-admin users.

A temporary solution for #6397.
2016-06-22 08:15:18 -05:00
Jonathan A. Sternberg 22173acb70 Update help and remove unused config options from the configuration file
Normalize the output for the various help options so they all follow the
same format and display all relevant options.

Removing some of the unused config options from the configuration file
and updating the help documentation. Removing some remaining references
to clustering within the open source version.
2016-06-21 14:06:05 -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
Paul Dix 04d1393425 Update usage url 2016-06-17 14:27:11 -04:00
Paul Dix 79d1f31d0b Update usage info to remove anonymous 2016-06-17 14:19:10 -04:00
Jonathan A. Sternberg 9837de793c Support regex and other operations for selecting the key in SHOW TAG VALUES
This adds support for using regex expressions in SHOW TAG VALUES when
selecting the key. Also supporting the `!=` operation for the
comparison. Now you can do any of the following:

    SHOW TAG VALUES WITH KEY != "region"
    SHOW TAG VALUES WITH KEY =~ /region/
    SHOW TAG VALUES WITH KEY !~ /region/

It also adds a new SetLiteral AST node that will potentially be used in
the future to allow set operations for other comparisons in the future.

Fixes #4532.
2016-06-13 10:03:14 -05:00
Jonathan A. Sternberg 55973d2815 Separate the task manager from the query executor
The task manager now acts as its own statement executor so that a custom
statement executor can perform custom actions for KillQueryStatement and
ShowQueriesStatement.
2016-06-10 12:30:51 -05:00
Jonathan A. Sternberg b8e22d9d79 Merge pull request #6586 from influxdata/js-3733-rename-default-retention-policy
Modify the default retention policy name and make it configurable
2016-06-06 15:05:29 -05:00
Jonathan A. Sternberg 5b26780ead Perform a proper exit for the reportServer goroutine
Previously, the goroutine would block for 24 hours and would only check
every 24 hours if the server was closed. Since this never happened, the
goroutine would just be abruptly killed when the main process ended
(since nobody waited for this goroutine to end).

Updating the code to exit when the server is closed immediately and
switching the timer to a ticker instance that can be stopped.
2016-06-05 10:45:19 -05:00
Jason Wilder 619c3c4229 Merge pull request #6735 from influxdata/jw-backup
Switch backup to use shard.Snapshot
2016-05-27 11:19:15 -06:00
Jason Wilder 0fb82d8787 Use UTC for expected times in TestServer_Query_LargeTimestamp 2016-05-27 09:46:07 -06:00
Jason Wilder 11959005f4 Switch backup to use shard.Snapshot
This switch the backup shard call to use the shard Snapshot that
internally creates a snapshot by hardlinking all of the TSM and
tombstone files instead.  This reduces the time that the FileStore
is locked and will allow for larger shards to be backup more easily.
2016-05-27 09:30:25 -06:00
Edd Robinson f4fc905fa9 Reject timestamps too far in future 2016-05-27 11:07:48 +01:00
Edd Robinson bc6e1e84af Change max time for SHOW meta queries
If all points in a series are timestamped in the future, the SHOW
queries will not return anything from these series.

This commit changes the to time used when querying shards for the SHOW
queries to the maximum time, in order to ensure future points are
considered in the results for these queries.

Fixes #6599.
2016-05-26 23:22:23 +01:00
Jonathan A. Sternberg 907c88d4b5 Truncate the shard group end time if it exceeds MaxNanoTime
Related to #6599.
2016-05-25 21:25:10 -04:00
Jonathan A. Sternberg cebe256773 Merge pull request #6706 from influxdata/js-remove-deprecated-features
Remove features that were deprecated for 1.0
2016-05-25 11:56:18 -04:00
Jonathan A. Sternberg baaa782c95 Modify the default retention policy name and make it configurable
The default retention policy name is changed to "autogen" instead of
"default" since it ends up being ambiguous when we tell a user to check
the default retention policy, it is uncertain if we are referring to the
default retention policy (which can be changed) or the retention policy
with the name "default".

Now the automatically generated retention policy name is "autogen".

The default retention policy is now also configurable through the
configuration file so an administrator can customize what they think
should be the default.

Fixes #3733.
2016-05-24 09:51:23 -04:00
Jonathan A. Sternberg 1518e5eb2c Update IF NOT EXISTS and IF EXISTS deprecated message
Removed the version that it would be removed in as we will not be
removing it for 1.0.
2016-05-24 09:50:23 -04:00
Jonathan A. Sternberg 6a3f7f5ded Remove support for fixing [[collectd]] and [[opentsdb]] sections 2016-05-24 09:50:15 -04:00
Jonathan A. Sternberg 5e7e0bd19b Filter out sources that do not match the shard database/retention policy
If you use a statement like this:

    SELECT value FROM one..cpu, two..cpu

It will access both the `one` and `two` databases as if you had selected
the `cpu` measurement twice for both of them. Updated the `tsdb.Shard`
create iterator function to filter out any sources that do not apply to
that shard so this duplication doesn't happen.

Fixes #6701.
2016-05-23 17:05:33 -04:00
Jack Zampolin 1f62ecd778 Merge pull request #6443 from influxdata/js-new-stress
Add v2 stress test
2016-05-23 13:47:33 -07:00
David Norton b32208a850 fix #2048: check that RPs exist before creating CQ 2016-05-20 12:40:36 -04:00
Edd Robinson afb56c33c1 Merge pull request #6678 from influxdata/er-client-fix
Ensure client sends correct precision
2016-05-20 11:13:03 +01:00
Edd Robinson 40732a35d0 Merge pull request #6660 from influxdata/er-vet
Fix vet issues
2016-05-20 11:12:25 +01:00
Edd Robinson effcccdcaf Set default consistency to all 2016-05-19 18:54:07 +01:00
Nathaniel Cook 904e8cc825 add config for http timeout 2016-05-19 10:53:29 -06:00
Edd Robinson 1b5c6b75c2 Ensure client sends correct precision 2016-05-19 17:27:32 +01:00
Edd Robinson f680ab0f0d Fix vet issues 2016-05-18 13:34:11 +01:00
Jonathan A. Sternberg 23f6a706bb Support cast syntax for selecting a specific type
Casting syntax is done with the PostgreSQL syntax `field1::float` to
specify which type should be used when selecting a field. You can also
do `field1::field` or `tag1::tag` to specify that a field or tag should
be selected.

This makes it possible to select a tag when a field key and a tag key
conflict with each other in a measurement. It also means it's possible
to choose a field with a specific type if multiple shards disagree. If
no types are given, the same ordering for how a type is chosen is used
to determine which type to return.

The FieldDimensions method has been updated to return the data type for
the fields that get returned. The SeriesKeys function has also been
removed since it is no longer needed. SeriesKeys was originally used for
the fill iterator, but then expanded to be used by auxiliary iterators
for determining the channel iterator types. The fill iterator doesn't
need it anymore and the auxiliary types are better served by
FieldDimensions implementing that functionality, so SeriesKeys is no
longer needed.

Fixes #6519.
2016-05-16 12:08:29 -04:00
Jonathan A. Sternberg a17f3d960a SHOW TAG VALUES accepts != and !~ in WHERE clause
Fixes #6607.
2016-05-16 08:51:09 -04:00
Jonathan A. Sternberg ecacdb7d21 query-log-enabled not ignored in config anymore
Fixes #6629.
2016-05-15 22:36:18 -04:00
Jason Wilder db7d58c867 Remove old cluster config options 2016-05-11 12:59:30 -06:00
Jason Wilder 75e89e35d8 Convert deprecated [cluster] config to [coordinator] 2016-05-11 12:35:19 -06:00
Jason Wilder 6cc1a34704 Rename cluster package to coordinator 2016-05-11 11:41:05 -06:00
Jason Wilder de04d0972d Remove old cluster code 2016-05-11 11:39:23 -06:00
Jonathan A. Sternberg 89346bb618 Merge pull request #6600 from influxdata/0.13
Merge 0.13 release candidate back to master
2016-05-11 13:04:26 -04:00
Jonathan A. Sternberg 733a17d9e9 Update SHOW FIELD KEYS to return the field type with the field key
Fixes #3451.
2016-05-10 13:16:57 -04:00
Cory LaNou 10db0aafeb Merge pull request #6591 from influxdata/cjl-issue-6590
intermittent test failing
2016-05-10 08:57:16 -05:00
Cory LaNou f39e9e910d intermittent test failing 2016-05-10 08:30:19 -05:00
Cory LaNou 4484182e86 remove old shard copier service 2016-05-10 08:14:51 -05:00
Jonathan A. Sternberg 5a6a34144e Fix config file loading to read from a file
Accidentally used `FromToml()` when trying to read from a file path
rather than `FromTomlFile()` which will read the file and then call
`FromToml()`.

Fixes #6578.
2016-05-08 09:00:29 -04:00
Jonathan A. Sternberg 3c3f7be355 Support the deprecated [collectd] and [opentsdb] sections temporarily
Performs an automatic search and replace on these sections of the
configuration file so they work for the 0.13 release. Will be removed
for 1.0.
2016-05-05 14:09:50 -04:00
Edd Robinson 0b338dddd8 Add remote monitor writer 2016-05-05 11:08:35 +01:00
Edd Robinson 2ae6a43c36 Disable Monitor when running dataonly mode 2016-05-04 18:22:01 +01:00
Jason Wilder 57cb3fdbc0 Merge pull request #6522 from influxdata/tp-tsm-dump
Dump TSM files to line protocol
2016-05-03 10:44:33 -06:00
Ben Johnson 49eb3b8d04
optimize show series iterator
This commit changes the `SeriesIterator` to process one measurement
at a time and uses a `floatFastDedupeIterator` to avoid point
encoding during deduplication.
2016-05-03 08:52:44 -06: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
Jonathan A. Sternberg 0cc99a3e27 Merge pull request #6504 from influxdata/js-2074-group-by-offsets
Support offset argument in the GROUP BY time(...) call
2016-05-02 15:00:26 -04:00
Jonathan A. Sternberg 64556e4f8e Support offset argument in the GROUP BY time(...) call
An offset of `time(1m, now())` will anchor the offset to the current
time of the query. The default offset is `0s` which is the current
default anyway.

This fixes #2074 by making time zone offset support unnecessary. Time
comparisons can use timezones inside of the time clause and the offset
needed for non-hour timezone differences can be used as part of the
offset argument.
2016-05-02 14:02:35 -04:00
Seif Lotfy ced79acac5 Remove redundant error return from (Client) Database(name string) and (Client) Databases() 2016-04-30 17:04:38 -05:00
Todd Persen 1378b8a3c8 Dump TSM files to line protocol. 2016-04-29 23:01:18 -07:00
Jonathan A. Sternberg 043bd6031e Return the time with a selector when there is no group by interval
The time of the point will be returned with a selector when there is no
group by interval and when there is only one selector. Any other
conditions will return the start time of the interval.

Fixes #5890.
2016-04-29 11:27:26 -04:00
Jonathan A. Sternberg 6f61c0ea4a Add POST /query endpoint and warning messages for using GET with write operations
In order to follow REST a bit more carefully, all write operations
should go through a POST in the future. We still allow read operations
through either GET or POST (similar to the Graphite /render endpoint),
but write operations will trigger a returned warning as part of the JSON
response and will eventually return an error.

Also updates the Golang client libraries to always use POST instead of
GET.

Fixes #6290.
2016-04-29 09:00:23 -04:00
Jonathan A. Sternberg 2ccbe26447 Fix the CLI not to enter an infinite loop when the liner has an error
This also removes the dependency on `os/user` and uses the `HOME`
environment variable which is more common on Linux and Mac OS X for
customizing the history file location.

Removing this import also lets the `influx` binary be cross-compiled as
`os/user` relies on cgo.
2016-04-28 08:35:54 -04:00
Ben Johnson f7af787aef
add DELETE query support
This commit adds query language support for deleting series with a
`DELETE` query.
2016-04-27 15:16:23 -06: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
Edd Robinson 289fe5bfcb Don't catch SIGQUIT; safer close of Quit channel 2016-04-27 14:38:48 +01:00
Ben Johnson 291dd08cd4
remove SHOW SERVERS & DROP SERVER
This commit removes support for `SHOW SERVERS` and `DROP SERVER`
from the `influxql` package. It also removes extraneous cluster
testing code from `cmd/influxd/run`.

Fixes #6465
2016-04-26 10:28:42 -06:00
Jack Zampolin 92c5e3828f Address PR comments 2016-04-25 11:19:02 -07:00
Jack Zampolin 0521ae78a0 Address PR comments 2016-04-25 11:13:10 -07:00
Philip O Toole ed7229fa2d Make it clear when CLI version is unknown
This mimics the behavior of the database binary.
2016-04-22 21:35:42 -07:00
Jonathan A. Sternberg e28d16cfcf Log slow queries if they pass a configurable threshold
Fixes #6429.
2016-04-22 12:04:15 -04:00
Jonathan A. Sternberg 5070f69bb2 Merge pull request #6444 from influxdata/js-config-from-env-var
Allow setting the config path through an environment variable
2016-04-22 11:28:57 -04:00
Jonathan A. Sternberg 9c09023508 Allow setting the config path through an environment variable
The config path previously could only be specified through the command
line options. This made it very difficult to set a default config path
without using any option.

Now the environment variable can be set so the default configuration
path is set to a specific place, but can be overwritten using the
command line option.

The primary purpose of this is so the Docker container can have a
default configuration file, but not have to parse the command line
options to figure out if a different configuration file has been
specified while still allowing the user to only type `influxd` and have
the program start correctly.

This might also help #6392 as it would allow a default configuration
location to be included with the package by setting an environment
variable.

A default search path is also provided now with checking the following
paths for a config file when none is specified:

* `~/.influxdb/influxdb.conf`
* `/etc/influxdb/influxdb.conf`

The config command has also been modified to read this config file
before outputting a sample config.
2016-04-22 09:33:53 -04:00
kun 82a4b5e7b1 fix cli writeColumns output 2016-04-22 18:25:14 +08:00
Jack Zampolin 9decf09d48 Add v2 stress test 2016-04-21 11:03:43 -07:00
Jason Wilder caa9592163 Fix setting uint config options via env vars 2016-04-20 14:38:08 -06:00
Stephen Gutekanst 9dc09c5257 Make logging output location more programmatically configurable (#6213)
This has various benefits:

- Users embedding InfluxDB within other Go programs can specify a different logger / prefix easily.
- More consistent with code used elsewhere in InfluxDB (e.g. services, other `run.Server.*` fields, etc).
- This is also more efficient, because it means `executeQuery` no longer allocates a single `*log.Logger` each time it is called.
2016-04-20 21:07:08 +01:00
Jason Wilder b1622fbcc7 Merge pull request #6426 from influxdata/jw-dataonly
Skip raft.db in dataonly build
2016-04-20 09:56:31 -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
Jason Wilder 4e8c397771 Skip raft.db in dataonly build 2016-04-19 13:54:13 -06:00
David Norton 5e9ff7bc93 add WriteAuthorizer interface 2016-04-19 00:03:57 -04:00
Jonathan A. Sternberg 93745d9693 Merge pull request #6391 from influxdata/js-5553-limit-queries-slow-with-group-by
Propagate the limit option to the low level iterators
2016-04-16 09:39:25 -04:00
Jonathan A. Sternberg bd5fdd797d Propagate the limit option to the low level iterators
When a GROUP BY or multiple sources are used, the top level limit
iterator requires reading the entire iterator stream so it can find all
of the tag groups it needs to return. For large data series, this ends
up with the limit iterator discarding a lot of output.

This change adds a new lower level limit iterator on each series itself
so that there are fewer data points that have to be thrown away by the
top level iterator.

Fixes #5553.
2016-04-15 18:23:54 -04:00
Jonathan A. Sternberg 86046bb2d0 Implement derivatives across intervals for aggregate queries
For aggregate queries, derivatives will now alter the start time to one
interval behind and will use that interval to find the derivative of the
first point instead of giving no value for that interval. Null values
will still be discarded so if the interval before the one you are
querying is null, then it will be discarded like if it were in the
middle of the query. You can use `fill(0)` to fill in these values.

This does not apply to raw queries yet.

Also modified the derivative and difference aggregates to use the stream
iterator instead of the reduce slice iterator for space efficiency.

Fixes #3247. Contributes to #5943.
2016-04-15 18:16:08 -04:00
gunnaraasen d983a8c0d3 Support env overrides for all inputs of the same type 2016-04-15 09:39:22 -07:00
Jonathan A. Sternberg 42b68d915f Return a deprecated message when IF NOT EXISTS is used
The deprecated message is now attached to a new attribute returned with
the results. This message can then be read by clients to warn a user
about upcoming changes to the query engine.

The `influx` client has already been modified to read this message and
print it out for every format except CSV.

The first warning message is a deprecated message about removing `IF NOT
EXISTS` from `CREATE DATABASE`.

The message will also be printed to the server log.

Fixes #5707.
2016-04-15 09:17:59 -04: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
Jonathan A. Sternberg 66a599825b Allow percentile to be used as a selector
Fixes #6292.
2016-04-13 13:29:14 -04:00
Gunnar cfa50bbd3d Merge pull request #6228 from influxdata/ga-multiple-inputs
Support multiple listeners per input
2016-04-12 15:31:38 -07:00
Jonathan A. Sternberg ea6262b712 Enhance comparing tags and fields in the where clause
Now it is possible to compare tags and fields and it is also now
possible to compare tags and tags. Previously, it was only possible to
compare fields with fields and tags with a string or a regex.

Fixes #3371.
2016-04-11 18:10:08 -04:00
Edd Robinson 7c34b1b3f8 Merge pull request #6281 from influxdata/er-fix-admin-docs
Use 'latest' alias for links to documentation
2016-04-11 22:35:12 +01:00
Ben Johnson 525e22c92b
tsm1 query engine alloc reduction
This commit makes a number of performance improvements to
reduce allocations during query execution. Several objects
and buffers are now reused across the components to avoid
allocations.

Previously a simple `count(value)` query across 1M points
would require 26,000+ allocations. After the changes in
this commit that number has been reduced to 88.
2016-04-11 14:50:59 -06:00
Jonathan A. Sternberg 815c49aa5f Integration test to check for empty tag behavior 2016-04-11 14:00:08 -04:00
gunnaraasen eec8cc94c7 Support multiple OpenTSDB inputs 2016-04-11 08:47:38 -07:00
gunnaraasen fccd0943a8 Support multiple collectd inputs 2016-04-11 08:47:38 -07:00
gunnaraasen 78086fa1f3 Remove init table attributes 2016-04-11 08:47:38 -07:00
Edd Robinson 44911bc5d8 Use 'latest' alias for links to documentation
Includes a fix for #6280
2016-04-11 14:56:53 +01:00
Jonathan A. Sternberg 6040375370 Modify cluster.TSDBStore interface to take a slice of meta.ShardInfo
The tsdb package can't have a dependency on the meta package so it takes
a slice of uint64 types. The clustering implementation needs the full
ShardInfo to know the shard owners though, so a different implementation
needs to be used by clustering.

The `*tsdb.Store` type gets wrapped in the cluster package so it can
implement the `IteratorCreator` function without having a dependency on
the meta package.
2016-04-05 16:40:32 -04:00
Todd Persen 05acce6645 Clarify the upgrade error message. 2016-04-04 15:28:35 -07:00
Jonathan A. Sternberg 37b63cedec Cleanup QueryExecutor and split statement execution code
The QueryExecutor had a lot of dead code made obsolete by the query
engine refactor that has now been removed. The TSDBStore interface has
also been cleaned up so we can have multiple implementations of this
(such as a local and remote version).

A StatementExecutor interface has been created for adding custom
functionality to the QueryExecutor that may not be available in the open
source version. The QueryExecutor delegate all statement execution to
the StatementExecutor and the QueryExecutor will only keep track of
housekeeping. Implementing additional queries is as simple as wrapping
the cluster.StatementExecutor struct or replacing it with something
completely different.

The PointsWriter in the QueryExecutor has been changed to a simple
interface that implements the one method needed by the query executor.
This is to allow different PointsWriter implementations to be used by
the QueryExecutor. It has also been moved into the StatementExecutor
instead.

The TSDBStore interface has now been modified to contain the code for
creating an IteratorCreator. This is so the underlying TSDBStore can
implement different ways of accessing the underlying shards rather than
always having to access each shard individually (such as batch
requests).

Remove the show servers handling. This isn't a valid command in the open
source version of InfluxDB anymore.

The QueryManager interface is now built into QueryExecutor and is no
longer necessary. The StatementExecutor and QueryExecutor split allows
task management to much more easily be built into QueryExecutor rather
than as a separate struct.
2016-04-04 13:27:17 -04:00
Cory LaNou 9bd60c3e07 remove node.json as well, change where we check for raft.db in startup 2016-03-31 17:15:58 -05:00
Cory LaNou a961ff9ebf minor restore fixes; fsync meta snapshots 2016-03-31 17:15:42 -05:00
Jonathan A. Sternberg 8752d1b1e3 Support chunked queries in the Go InfluxDB client
Modify the CLI to always use chunked queries.
2016-03-31 15:30:43 -04:00
Edd Robinson 9cd0bc65f5 Let SHARD DURATION be specified in isolation
Fixed #6152.
2016-03-31 17:42:50 +01:00
Jonathan A. Sternberg ad7480e64b Limit bucket count in selection
Fixes #6078.
2016-03-30 22:57:09 -04:00
Jonathan A. Sternberg 178a6e2f0a Merge pull request #6113 from influxdata/js-6112-simple-moving-average
Implement simple moving average
2016-03-30 20:57:55 -04:00
Jonathan A. Sternberg 711a6614e6 Implement the point limit monitor
Fixes #6077.
2016-03-30 16:08:56 -04:00
Joe LeGasse f10c300765 Update to conversion tool to work in current versions
After adding type-switches to the tsm1 packages, the custom
implementation found in the conversion tool broke. This change uses
tsm1.NewValue() instead of a custom implementation.

This change also ensures that the tsm1.Value interface can only be
implemented internally to allow for the optimized type-switch based
encoding
2016-03-30 13:26:46 -04:00
Jonathan A. Sternberg 6453dbc249 Implement simple moving average
The simple moving average will gradually emit points instead of waiting
until the end. This should apply to derivative and difference in the
future too.

Fixes #6112.
2016-03-29 14:36:43 -04:00
Jonathan A. Sternberg c1643e69c1 Have the server kill all queries on shutdown
Related to #6140, but won't actually fix that problem. It will correctly
stop new queries from being started during shutdown and will send the
interrupt signal to queries during shutdown.

Since the interrupt signal is asynchronous, there isn't currently a way
to wait for the queries to complete themselves before shutting down the
engine.
2016-03-29 11:48:21 -04:00
Jonathan A. Sternberg a86632912f Fix the difference test
A recent bugfix to CREATE RETENTION POLICY caused this to fail when
merged. This fixes the test.
2016-03-29 10:03:43 -04:00
Jonathan A. Sternberg 9ddc59aab5 Merge pull request #6105 from influxdata/js-1825-difference-function
Implement the difference function
2016-03-29 09:37:59 -04:00
Jonathan A. Sternberg a9720f926e Implement the difference function
The difference function is implemented very similar to how derivative is
implemented. It is an aggregate function that acts over the entire
aggregate. This function will also have the same problems that
derivative has with getting values from the previous interval or point.
This will be fixed separately as part of #5943.

Fixes #1825.
2016-03-29 09:27:12 -04:00
Edd Robinson adffbc2ba0 Fix tests to not clash with retention policy 2016-03-29 11:27:58 +01:00
Tait Clarridge 45b3e61ac7 Add configurable shard duration to retention policies
Allows configuration of shard group duration at database creation, and retention
policy create/alter time.

Query examples:

```
CREATE DATABASE testdb WITH DURATION 90d SHARD DURATION 30m NAME rp_testdb
CREATE RETENTION POLICY rp_testdb2 ON testdb DURATION INF REPLICATION 1 SHARD DURATION 30m
ALTER RETENTION POLICY rp_testdb2 ON testdb SHARD DURATION 1h
```

This can be useful with long duration retention policies with lots of data, where
you can split into smaller shards to relieve memory pressure.
2016-03-24 00:25:49 -04:00
Ben Johnson a6d9930b6f limit series count in selection
This commit adds a configurable limit to the number of series that
can be returned from a `SELECT` statement. The limit is checked
immediately after planning and is determined by the use of iterator
stats.

Fixes #6076
2016-03-23 12:48:48 -06:00
Jonathan A. Sternberg 79fe4490c2 Support a timeout for running queries in the query manager
Include an interrupt iterator at the top level to interrupt the fill
iterator if it is producing too many points.

Fixes #6075.
2016-03-22 13:30:40 -04:00
Jonathan A. Sternberg a35d9602cd Fix where filters when a OR is used and when a tag does not exist
If an OR was used, merging filters between different expressions would
not work correctly. If one of the sides had a set of series ids with a
condition and the other side had no series ids associated with the
expression, all of the series from the side with a condition would have
the condition ignored. Instead of defaulting a non-existant series
filter to true, it should just be false and the evaluation of the one
side that does exist should take care of determining if the series id
should be included or not. The AND condition used false correctly so did
not have to be changed.

If a tag did not exist and `!=` or `!~` were used, it would return false
even though the neither a field or a tag equaled those values. This has
now been modified to correctly return the correct series ids and the
correct condition.

Also fixed a panic that would occur when a tag caused a field access to
become unnecessary. The filter using the field access still got created
and used even though it was unnecessary, resulting in an attempted
access to a non-initialized map.

Fixes #5152 and a bunch of other miscellaneous issues.
2016-03-22 12:19:06 -04:00
Jonathan A. Sternberg 8ab1a9b513 Merge pull request #6083 from influxdata/js-6079-limit-max-concurrent-queries
Limit the maximum number of concurrent queries
2016-03-22 12:08:36 -04:00
Jason Wilder 7857e07a1e Merge pull request #6062 from influxdata/mr-prune-wal-config
Remove unused WAL configuration variables/fields
2016-03-22 09:20:27 -06:00
Jonathan A. Sternberg d96002f906 Merge pull request #5620 from influxdata/md-avoiding-downtime
Add notes on how to avoid downtime
2016-03-21 22:36:12 -04:00
Jonathan A. Sternberg abae1cfed0 Limit the maximum number of concurrent queries
Fixes #6079.
2016-03-21 22:34:27 -04:00
Jonathan A. Sternberg 117f62c33e Implement a simple task manager for queries
The currently running queries can be listed with the command
`SHOW QUERIES` and it will display the current commands that have been
run, the database they were run against, and how long they have been
running.
2016-03-21 12:06:06 -04:00
Mark Rushakoff 7a2adfcc5d Remove unused WAL configuration variables/fields
These were all b1/bz1 settings that no longer have any effect:

- {Default,}MaxWALSize
- {Default,}WALFlushInterval
- {Default,}WALPartitionFlushDelay
- {Default,WAL}ReadySeriesSize
- {Default,WAL}CompactionThreshold
- {Default,WAL}MaxSeriesSize
- {Default,WAL}FlushColdInterval
- {Default,WAL}PartitionSizeThreshold
2016-03-20 13:16:52 -07:00
Sean Beckett ddcc66a44c Update README.md 2016-03-18 19:09:01 -04:00
Michael Desa 341eeeedee Add notes on how to avoid downtime 2016-03-18 19:09:01 -04:00
Jonathan A. Sternberg 43a5e84aaf Merge pull request #6047 from influxdata/js-6040-boolean-distinct
Support the distinct() call for booleans
2016-03-17 17:17:21 -04:00
Jonathan A. Sternberg e47426ff6e Support integer literals in the query language
Numbers in the query without any decimal will now be emitted as integers
instead and be parsed as an IntegerLiteral. This ensures we keep the
original context that a query was issued with and allows us to act more
similar to how programming languages are typically structured when it
comes to floats and ints.

This adds functionality for dealing with integers promoting to floats in
the various different places where math are used.

Fixes #5744 and #5629.
2016-03-17 10:37:34 -04:00
Jonathan A. Sternberg 2e7816ebd9 Support the distinct() call for booleans
Normalize the time for the distinct() call to either be at the beginning
of the group by interval or the start time similar to every other call.
The timestamp previously just showed the first time found and didn't
make a lot of sense in the context of what the function was supposed to
do.

Fixes #6040.
2016-03-17 09:32:54 -04:00
Gunnar c6ff2588d1 Merge pull request #6025 from influxdata/ga-remove-json
Remove deprecated JSON write path
2016-03-16 14:17:23 -07:00
gunnaraasen d96eef4c52 Remove deprecated JSON write path 2016-03-15 19:52:41 -07:00
Jason Wilder defc594139 Add a build tag to disable all services except TCP endpoint 2016-03-15 20:27:01 -06:00
Ross McDonald 194b7db848 Updated influx_tsm readme with information about shard permissions. 2016-03-15 08:51:32 -05:00
Cory LaNou 1d2c1faa94 address PR feedback 2016-03-14 16:55:54 +00:00
Ben Johnson ea37ed98e5 CHANGELOG 2016-03-14 16:55:54 +00:00
Cory LaNou d024ca2552 modify WritePoints function signature for p products 2016-03-14 16:55:54 +00:00
Cory LaNou cd84f26c34 remove startup check for monitoring 2016-03-14 16:55:54 +00:00
Cory LaNou 27cfaa4b7a in memory meta, single node configs, etc. 2016-03-14 16:55:54 +00:00
Philip O Toole b9cbff8ac4 Format all logging 2016-03-11 10:05:54 -08:00
Edd Robinson 7dbc0f49d3 Merge pull request #5818 from influxdata/er-upgrade-error
Highlight upgrade info for old shards
2016-03-09 19:39:59 +00:00
Jason Wilder 4e8b4c41b8 Fix rollback from 0.11
0.11 no longer uses some files from 0.10.  The code was a little
too aggressive and remove these files which would break rolling back
to 0.10 if necessary.  Since shards must be migrated to tsm before
upgrading to 0.11 and a user might not know they still have old shard
formats, they would not be able to revert back to 0.11 and migrate
them.

Also adds uptime stats to usage data.
2016-03-09 11:19:47 -07:00
Ben Johnson 41dde61226 SHOW SERIES 2016-03-08 11:47:57 -07:00
Joe LeGasse af967a3cac Fix b1 conversion regression added in 0.10.2
Fixes #5924
2016-03-08 11:17:59 -05:00
Todd Persen c7f8402dfe Get client version dynamically 2016-03-07 17:16:38 -08:00
Jonathan A. Sternberg 2f0e246757 Implemented the tag values iterator for `SHOW TAG VALUES`
`SHOW TAG VALUES` output has been modified to print the measurement name
for every measurement and to return the output in two columns: key and
value. An example output might be:

    > SHOW TAG VALUES WITH KEY IN (host, region)
    name: cpu
    ---------
    key     value
    host    server01
    region  useast

    name: mem
    ---------
    key     value
    host    server02
    region  useast

`measurementsByExpr` has been taught how to handle reserved keys (ones
with an underscore at the beginning) to allow reusing that function and
skipping over expressions that don't matter to the call.

Fixes #5593.
2016-03-06 09:52:34 -05:00
Joe LeGasse acd2e1eb51 influx_tsm: Properly limit blocks per key per TSM file
This should fix #5865

This commit also removes the dependecy on the influxql package constants
that were used to write b1 and bz1 files and have changed since the
release of 0.10
2016-03-03 09:05:32 -05:00
Joe LeGasse 3a876d483e influx_tsm: multiple improvements
- Removed a lot of unused code
- Consolidated types
- Improved allocations for converting b1 shards
- Eliminated allocations when sorting cursors
- Eliminated allocations from removing NaN and Infinity values,
    they are removed by the cursors now
- Separated out the stats from the conversion tracker
- Removed allocations from shard reader buffers
- Improved logic for shard reader Next()/Read()
2016-02-29 16:16:54 -05:00
Jason Wilder 8d70d65a82 Convert time.Time to int64 2016-02-25 15:15:01 -07:00
Ben Johnson eaed2aadcf Merge pull request #5811 from benbjohnson/remote-exec-2
Remote Execution
2016-02-25 09:05:17 -07:00
Ben Johnson 0dda9f6608 add remote execution
This commit adds remote execution to the query engine.
2016-02-25 08:41:20 -07:00
Ross McDonald 1a62cdbd9a Removed builtTime reference from influxd. Removed default version information from influxd. 2016-02-25 09:35:03 -06:00
Ross McDonald 6efd822810 Remove build time linker flag so that we can create reproducible builds. 2016-02-25 09:35:03 -06:00
Edd Robinson aa845cec7e Check for shards needing conversion. Fixes #5723 2016-02-25 13:21:13 +00:00
Goutham Veeramachaneni b1d7e59546 Lint cmd/ packages
Related to #4098

Lint cmd/influxd/

* Errors cannot end with punctuation
* Better comment for exported method
* Better control flow when return is present

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

Linted cmd/influx_tsm

* Added comments to exported fields
* Removed punctuation at the end of errors

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

Linted cmd/influx_tsm/b1 and cmd/influx_tsm/bz1

* Added comments to exportes fields

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

Linted cmd/influx_tsm/tsdb

* Added comments to exported fields
* range k, _ :=  can be written as range k :=
* removed else when return is present
* Added consistency to receiver names in methods

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

Fix typos

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2016-02-25 01:44:23 +05:30
Edd Robinson 8add49fd96 Ensures meta queries work in clusters.
Fixes #5612, #5573 and #5518.

Using the MetaExecuter, queries that need to run on both data nodes
and optionally the meta store will be executed across all data nodes
in the cluster.
2016-02-24 11:24:45 -05:00
David Norton 4d4e382ddf Add a Meta Executor.
The Meta Executor will make allow data nodes to execute queries
remotely on each other, via RPC calls.
2016-02-24 11:24:22 -05:00
Jason Wilder e0b23fd5b0 Merge pull request #5765 from oiooj/master
No need check Meta.Dir twice
2016-02-23 11:20:24 -07:00
Jason Wilder 92ae2a0e2d Merge pull request #5787 from chris-ramon/handler-query-authorizer
Improvement on `run.NewServer` related to `meta.QueryAuthorizer`.
2016-02-23 11:11:56 -07:00
Jason Wilder 9ead458399 Fix data nodes not getting created
This fixes a regression introduced in #5757 due to the node.ID getting
assigned by both the meta and data services.  When both roles are active,
the data CreateDataNode path was not getting called because a node ID was
already assigned.

This fixes the issue by seeing if a DataNode already exists for our node
ID, and if it does not, we create one.
2016-02-23 09:01:02 -07:00
Chris Ramón e52accaf90 adds missing srv.Handler.QueryAuthorizer 2016-02-23 00:02:48 -05:00
Jason Wilder 6f39b355bc Code cleanups 2016-02-22 15:06:05 -07:00
Jason Wilder a2d3d44505 Fix creating meta only nodes
This fixes a couple of issues with starting meta-only nodes.

1. We were always calling CreateDataNode regardless of whether the the
node is running data services.  We only call that now when node is
data enabled.
2. The node.json was created along-side creating the data node. Since
we are not creatinga a data node, this didn't happen anymore.  There
wasn't a simple way to do this in one place so it's actually handle
for when creating a meta or a data node now.  Since the ID assigned
to the node is the same regardless of role this works in all combinations
of roles.
3. The JoinMetaServer didn't return the ID of the joining node which
created some races when multiple nodes were joining.  The join call now
returns that information to the caller.

Fixes #5754
2016-02-22 15:06:05 -07:00
Jason Wilder 194d8d4693 Ensure monitor store is disabled for meta only nodes
We can't store points locally so ensure it's disabled for now.
2016-02-22 15:05:47 -07:00
Jason Wilder a437002969 Fix join option in config file
The join option was incorrectly exposed on the meta config.  It should
be at the top-level as a string and propogate down to the meta config
as a slice.
2016-02-22 15:05:46 -07:00
oiooj f1c027543c No need check Meta.Dir twice 2016-02-20 23:54:24 +08:00
Jonathan A. Sternberg a8d637b03c Ensure column names get implicitly renamed with conflicts 2016-02-19 14:35:56 -05:00
Jonathan A. Sternberg 8fc6a0f648 Merge pull request #5732 from influxdata/js-5730-binary-expr-column-name
Assign a name to columns with binary expressions in them
2016-02-19 14:30:43 -05:00
Jason Wilder 645eb44ea9 Merge pull request #5735 from influxdata/kostasb-screen-influx_tsm
screen suggestion for influx_tsm
2016-02-18 16:08:40 -07:00
Jason Wilder dedd6f2e9e Fix hostname/bind addresses
This fixes several issues related to the bind address and hostname:
* Allows bind addresses where a hostname or IP is not specified to
work correct and bind to all interfaces by default.
* Fixes the top-level "hostname" config option to allow overridding
all bind address hostnames.  This allows a node to advertise a different
hostname than what is defined in the bind address setting.
* Adds the -hostname command-line option back to allow specifing
both -join and -hostname as command-line flags.
* Enforces a configuration precedence and overriding ability defined
as config file is overridden by env vars which are overriden by command-line
flags.

Fixes #5670 #5671
2016-02-18 14:45:34 -07:00
Jason Wilder 04b3914b33 Merge pull request #5743 from influxdata/mr-meta-httpd-headers
Update HTTP headers in meta service's httpd
2016-02-18 13:59:46 -07:00
Mark Rushakoff 57dd54250f Correctly set X-Influxdb-Version in meta httpd 2016-02-18 12:34:03 -08: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
Jonathan A. Sternberg 983f810539 Assign a name to columns with binary expressions in them
The name of the column will be every measurement located inside of the
math expression in the order they are encountered in within the
expression.

Also handle `*influxql.ParenExpr` in the function
`(*influxql.Field).Name()`

Fixes #5730.
2016-02-18 10:11:28 -05:00
joelegasse 7479584afd Merge pull request #5725 from influxdata/jl-influx-tsm
influx_tsm: close bolt databases properly
2016-02-18 10:01:00 -05:00
Kostas Botsas b7544c6e7e screen suggestion for influx_tsm
Added a suggestion to run influx_tsm under a screen session to avoid interruptions due to console disconnects.
2016-02-18 11:41:30 +02:00
Jason Wilder b4490788a0 Merge pull request #5512 from influxdata/ga-remove-json-write
Remove JSON write path
2016-02-17 16:52:22 -07:00
Ben Johnson e3b4b71c13 refactor query executor
This commit moves the `QueryExecutor` to the `cluster` package
and provides an interface to it inside the `influxql` package.
2016-02-17 15:13:56 -07:00
Joe LeGasse 58033b1efa influx_tsm: close bolt databases properly
Fixes #5724
2016-02-17 14:20:28 -05:00
Edd Robinson f315444f86 Merge pull request #5255 from titilambert/github4752
Workaround for #4752
2016-02-17 11:00:58 +00:00
gunnaraasen a7a8258b3e Add config option to enable JSON write path 2016-02-16 16:29:25 -08:00
Jonathan A. Sternberg 23da067593 Fix meta.Client CreateDatabaseWithRetentionPolicy RPC command
Previously, meta.Client would drop the default retention policy when
trying to create a database with a retention policy. The RPC has now
been modified to include the desired retention policy in the
CreateDatabase command and have it use that retention policy information
instead of the default configuration when provided.

This also lowers the number of RPC calls for
CreateDatabaseWithRetentionPolicy to only a single RPC call instead of
two.

Protections have also been included so creating a retention policy with
different parameters will return an error similar to if you tried to
modify the retention policy separately.

Fixes #5696.
2016-02-16 16:21:26 -05:00
Joe LeGasse 9af4894c1c influx_tsm: ignore series index and convert all points
A case (#5606) was found where a lot of data unexpectedly disappeared from a database
following a TSM conversion.

The proximate cause was an inconsistency between the root Bolt DB bucket list
and the meta data in the "series" bucket of the same shard. There were apparently valid
series in Bolt DB buckets that were no longer referenced by the meta data
in the "series" bucket - so-called orphaned series; since the conversion
process only iterated across the series found in the meta data, the conversion process
caused the orphaned series to be removed from the converted shards. This resulted in the
unexpected removal of data from the TSM shards that had previously been accessible
(despite the meta data inconsistency) in the b1 shards.

The root cause of the meta data inconsistency in the case above was a failure, in versions prior
to v0.9.3 (actually 3348dab) to update the "series" bucket with series that had been created in
previous shards during the life of the same influxd process instance.

This fix is required to avoid data loss during TSM conversions for shards that were created with
versions of influx that did not include 3348dab (e.g. prior to v0.9.3).

Analysis-by: Jon Seymour <jon@wildducktheories.com>
2016-02-16 13:46:01 -05:00
Joe LeGasse 1b8fc0c154 influx_tsm: don't defer reader.Close() until after Open()
Fixes #5656
2016-02-16 13:44:08 -05:00
Nicholas Katsaros a727266744 Add graphite and udp services to the default config generator
Fix #4752
2016-02-16 10:12:48 -05:00
Jason Wilder 6fb00c1a9b Remove MetaServers from node.json
This removes the MetaServers property from node.json to eliminate one
of the four places those addresses are stored on disk.  We always use
the values that come through the config (via file, env var or -join arg).
2016-02-15 22:42:51 -07:00
Cory LaNou 7ad31fa6ab address pr feedback 2016-02-12 11:35:20 -07:00
Jason Wilder ddcfac7e8e Remove peers.json
No longer needed now that peers are pull from the meta nodes.
2016-02-12 11:35:20 -07:00
Cory LaNou 360f40561e misc fixes and changelog 2016-02-12 11:35:19 -07:00
Cory LaNou d9f1df0ecf sane cluster starting with join args 2016-02-12 11:32:53 -07:00
Jason Wilder e1effa6601 fix build after rebase on master 2016-02-12 11:32:53 -07:00
Jason Wilder 948ccfc7b1 Remove printlns in tests 2016-02-11 13:34:33 -07:00
Ross McDonald 51758cff25 Switched 0.9 references to 0.10. 2016-02-11 08:44:45 -06:00
Ben Johnson f27cef7b71 Merge pull request #5621 from benbjohnson/influxdata
Fix additional influxdata renames
2016-02-10 14:57:32 -07:00
Jonathan A. Sternberg 31cbc3eef8 Merge pull request #5622 from li-ang/rm_empty_file
Remove empty test file
2016-02-10 16:38:00 -05:00
Ben Johnson 50616f0a47 fix additional influxdata renames 2016-02-10 14:19:42 -07:00
liang@qiniu.com 47fa63073a Remove empty test file 2016-02-11 04:56:27 +08:00
Ben Johnson 2f1e83427b Merge pull request #5617 from benbjohnson/influxdata
Rename influxdb/influxdb to influxdata/influxdb
2016-02-10 13:29:46 -07:00
Ben Johnson d9a6a7340f add canonical paths 2016-02-10 11:30:52 -07:00
Jason Wilder 2212c32108 Merge pull request #5604 from jonseymour/typo
typo: databse -> database
2016-02-10 11:04:39 -07: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
Jonathan A. Sternberg dd3c75ef1c Remove a bad query test from the integration tests
We no longer throw this error and an empty result is appropriate since
there are no values in that interval.
2016-02-10 09:40:30 -07:00
Jonathan A. Sternberg 5c9cdd05c2 Modify the fill iterator to not produce empty name/tags for a time range
If a name/tag combination does not have any points in the time range at
all, fill will not generate points for it.
2016-02-10 09:40:30 -07:00
Ben Johnson 08f823546d fix rebase issue 2016-02-10 09:40:29 -07:00
Ben Johnson 627cd9d486 add dedupe iterator 2016-02-10 09:40:29 -07:00
Jonathan A. Sternberg dbb9b36d84 Support integers with top() and bottom() and fix point ordering
top() and bottom() point ordering was incorrect and using an inefficient
method of sorting. It has now been updated to use a heap and ordering is
being done by value first and time second (with earlier times always
taking priority).

Removed unit tests that test using `time` inside of the query to get the
real time instead of the interval time and only allowing the default
behavior. We will have another mechanism to get the real time during an
interval, but the current method is deprecated.

The top() and bottom() methods now have integer support.
2016-02-10 09:40:27 -07:00
Ben Johnson a0fe0ca437 fix new query engine test regressions 2016-02-10 09:40:27 -07:00
Ben Johnson b8918a780c integer support 2016-02-10 09:40:25 -07:00
Jonathan A. Sternberg e7d39092d2 Updating the unit tests for TestServer_Query_Aggregates_IntMany_GroupBy
It had the time values for the selectors being returned equal the actual
points time. We have decided to have the time always be the interval
time and adding another feature later that can return the selected
point's time in the future.
2016-02-10 09:40:25 -07:00
Ben Johnson 57336bd6ee fix conditionals 2016-02-10 09:40:24 -07:00
Ben Johnson 60b051ee88 LIMIT/OFFSET 2016-02-10 09:40:24 -07:00
Ben Johnson cde973f409 refactor query engine 2016-02-10 09:40:24 -07:00
Jon Seymour 375f56333e typo: databse -> database
Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-10 11:34:34 +11:00
Philip O'Toole 3c1cbe0ea7 Don't dump blank entry for backup dir if not set 2016-02-09 08:13:40 -08:00
Philip O'Toole d2908def07 Make it clear what the trailing parallel factor is 2016-02-09 08:13:37 -08:00
Jason Wilder d4ee1cb2b1 Merge pull request #5284 from mglazer/secure-cli
CLI Option to Connect without HTTPS Verifica…
2016-02-08 11:45:32 -07:00
Jason Wilder c2fb3f8590 Merge pull request #5570 from jonseymour/typo
typo: remove trailing i.
2016-02-08 08:31:40 -07:00
Jon Seymour 0f674e5c59 typo: remove trailing i.
Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-08 16:44:42 +11:00
runner.mei 978305a6dd fix unit test of influxd in the windows
fix unit test of influxd in the windows
2016-02-05 11:44:14 +08:00
Jason Wilder 1c19320e79 Merge pull request #5515 from influxdata/jw-config
Remove top-level dir config option
2016-02-02 13:26:11 -07:00
Jason Wilder 51da6e3d56 Remove top-level dir config option
This breaks backup/restore if it's not "meta" as well as breaks
upgrades from prior releases for some users.
2016-02-02 13:03:44 -07:00
Seif Lotfy 0864816c8b Add unit tests to ensure retention policy for non existing db is not created 2016-02-02 21:03:16 +01:00
Seif Lotfy c3fb710871 Initialize MetaClient before setting it up as a data and/or meta node
Take out MetaClient initialization from initializeDataNode and invoke it
in (server.)Open after MetaService is opened.
Fixes #5479
2016-02-02 17:39:29 +01:00
Edward Robinson b8e42cdd3a Ensure non-interactive mode returns appropriate exit code
Fixes #5475.
2016-02-02 15:23:16 +00:00
Cory LaNou f8b1aa69a1 ignore join arguments on restart 2016-02-01 12:47:15 -05:00
joelegasse 834744a4c3 Merge pull request #5472 from influxdata/jl-backup-dir
Update influx_tsm to use a backup directory
2016-01-28 13:35:57 -05:00
Joe LeGasse 8f3131b97d Update influx_tsm to use a backup directory 2016-01-28 12:36:34 -05:00
Cory LaNou 0f6c75ab7d make tests pass 2016-01-28 11:03:44 -06:00
Cory LaNou 53323737b2 no longer need nil check 2016-01-28 10:05:54 -06:00
Cory LaNou d70b694d7d fix misc meta statup bugs 2016-01-28 10:05:53 -06:00