Commit Graph

9632 Commits (4961a4435bf78af17dfb7cd0560d3f8b40a9f341)

Author SHA1 Message Date
Nathaniel Cook 4961a4435b Fix nil comparison for top/bottom 2016-03-07 15:21:22 -07:00
Nathaniel Cook 46fc6e5516 Expose Reduce Functions for Kapacitor 2016-03-07 14:03:14 -07:00
Jonathan A. Sternberg 370f8e4176 Merge pull request #5916 from influxdata/js-refactor-reduce-slice-func
Refactor reduce slice func to use the aggregator and emitter
2016-03-07 15:49:37 -05:00
Jonathan A. Sternberg 9c5bc8ab2b Refactor reduce slice func to use the aggregator and emitter 2016-03-07 13:25:45 -05:00
Jonathan A. Sternberg bfedf69435 Merge pull request #5853 from influxdata/js-5593-show-tag-values
Implemented the tag values iterator for `SHOW TAG VALUES`
2016-03-07 10:38:11 -05: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
Jonathan A. Sternberg 4e8004ec83 Merge pull request #5900 from influxdata/js-5890-fix-first-last-timestamps
Fix sorting of `first()` and `last()` calls across shards
2016-03-04 17:10:40 -05:00
Jonathan A. Sternberg 9113839e4c Fix sorting of `first()` and `last()` calls across shards
Previously the call iterator would normalize the time to the interval
for all calls. This meant that when `first()` or `last()` was called
with no group by interval the value would be found for each shard, the
time was normalized, then it tried to find the value between the shards
(but no longer with any time data as that had already been eliminated).

This removes part of the time logic from the call iterators and makes a
new iterator `IntervalIterator` to normalize the times as they come out
of the underlying iterator.

Fixes #5890.
2016-03-03 21:15:43 -05:00
Jonathan A. Sternberg af01984480 Merge pull request #5903 from influxdata/js-fix-point-sorting-for-distinct
Fix sorting for distinct by sorting by value when the point time is the same
2016-03-03 21:14:56 -05:00
Jonathan A. Sternberg 8d89a203a2 Fix sorting for distinct by sorting by value when the point time is the same 2016-03-03 19:09:38 -05:00
Jason Wilder a937e8af98 Add 0.10.2 changelog entries
[ci skip]
2016-03-03 15:38:42 -07:00
Jonathan A. Sternberg caee9a475c Merge pull request #5895 from influxdata/js-5886-more-aggregate-iterator-types
Support all iterator types for count(), first(), and last()
2016-03-03 15:23:57 -05:00
Jonathan A. Sternberg 6e34679fd2 Merge pull request #5893 from influxdata/js-5892-floating-point-division-for-integers
Have division always return a float in the new query engine
2016-03-03 15:20:23 -05:00
joelegasse 4f15e7af13 Merge pull request #5891 from influxdata/jl-influx-tsm
influx_tsm: Properly limit blocks per key per TSM file
2016-03-03 11:58:22 -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
Jonathan A. Sternberg fabc41dcfb Have division always return a float in the new query engine
Fixes #5892.
2016-03-03 08:15:54 -05:00
Jonathan A. Sternberg e3660fae93 Support all iterator types for count(), first(), and last()
All three of these iterators are supposed to support all four types of
iterators, but the implementation was never done for string or boolean.

Fixes #5886.
2016-03-02 23:49:55 -05:00
Jonathan A. Sternberg 2440568b27 Merge pull request #5875 from influxdata/js-5852-mean-function-accuracy
Improve mean accuracy while retaining the speedup with a custom iterator
2016-03-02 17:09:58 -05:00
Jonathan A. Sternberg 1c543b28a9 Refactored call iterators to make them public and more usable as a library
This refactor is primarily to support Kapacitor. Kapacitor doesn't care
about the iterators and mostly keeps the points it handles in memory.
The iterator interface is more than Kapacitor cares about.

This commit refactors and opens up the internals of aggregating and
reducing incoming points so it can be used by an outside library with
the same code. It also makes the iterators used by the call iterators
publically usable with new functionality.

Reducers are split into two methods which are separate interfaces that
can be combined for dealing with casting between different types. The
Aggregator interfaces accept points into the aggregator and retain any
internal state they need. The Emitter interface will then create a point
from that aggregated state which can be fed to the iterator. The
Emitters do not fill in the name or tag of the point as that is expected
to be done by the person aggregating the point. While the Emitters do
sometimes fill in the time, that value will also be overwritten by the
iterator. Filling in the time is to allow a future version that will
allow returning the point time instead of just the interval time.
2016-03-02 16:10:49 -05:00
Jonathan A. Sternberg 6dd6281ef9 Merge pull request #5882 from influxdata/js-5871-fix-limit-multiple-sources
Fix limit iterator with multiple sources
2016-03-02 14:54:14 -05:00
Jonathan A. Sternberg d11bc6182c Improve mean accuracy while retaining the speedup with a custom iterator
Fixes #5852.
2016-03-02 14:48:11 -05:00
joelegasse 77513a57b5 Merge pull request #5887 from influxdata/jl-http-keepalive
Don't close HTTP Connections
2016-03-02 13:45:01 -05:00
Joe LeGasse 92955fa701 Updated CHANGELOG
Fixes #5880
2016-03-02 13:03:10 -05:00
Joe LeGasse 5d3f6e199a Keep connections alive when using Go 1.4.3
Go 1.4.3 was a security release that also created a strange edge-case
that caused connections to not be kept alive and reused when Close()
is called on the Body of the request. Close() hasn't been required on
the Body of a request for some time, so there is no harm is not calling
it anymore.
2016-03-02 13:02:41 -05:00
Jason Wilder b39c35c5c4 Merge pull request #5879 from influxdata/jw-data-node
Data node fixes
2016-03-02 09:36:20 -07:00
Jason Wilder a54befbd96 Fix comment typo 2016-03-02 09:22:20 -07:00
Jason Wilder a1c9ce67d6 Switch remote write logic back to original version
CreateShard is expensive and should not be called for every write
request.
2016-03-01 21:23:28 -07:00
Jason Wilder 6bbd09ed94 Update changelog 2016-03-01 21:23:28 -07:00
Jason Wilder 43118ce78e Send database and retention policy with remote writes
There was a race where a remote write could arrive before a meta
client cache update arrived.  When this happened, the receiving node
would drop the write because it could not determine what database
and retention policy the shard it was supposed to create belonged
to.

This change sends the db and rp along with the write so that the
receiving node does not need to consult the meta store.  It also
allows us to not send writes for shards that no longer exist instead
of always sending them and having the receiving node logs fill up
with dropped write requests.  This second situation can occur when
shards are deleted and some nodes still have writes queued in hinted
handoff for those shards.

Fixes #5610
2016-03-01 21:23:03 -07:00
Jason Wilder cd4ef1856b Use TCPHost when checking for existence of data node
Host is the http endpoint and is not really needed.
2016-03-01 21:23:03 -07:00
Jonathan A. Sternberg 87fc143732 Fix limit iterator with multiple sources
The limit iterator would short circuit if there were no dimensions and
all points had been read. It also needs to consider that multiple
sources will require reading the entire iterator too, so the short
circuit requires only a single source.

Fixes #5871.
2016-03-01 21:44:45 -05:00
Jason Wilder e3fef5593c Merge pull request #5855 from jonseymour/jss-5854-go-master-breaks-build
fix tests to cope with future changes to testing.quick.Check - see #5854
2016-03-01 19:03:21 -07:00
Ross McDonald 89f755981c Merge pull request #5869 from influxdata/ross-godep-update
Pin golang.org/x/tools build dependency
2016-03-01 10:00:57 -06:00
Ross McDonald 01140fa1c1 Fixed issue with debug command output being used even though debug wasn't specified. 2016-03-01 09:45:15 -06:00
Edd Robinson 5eba0ea1b4 Merge pull request #5736 from influxdata/er-shard-owners
Cleanup shards and shard groups when dropping data node
2016-03-01 14:14:27 +00:00
joelegasse 7adbd7da6e Merge pull request #5863 from influxdata/jl-influx-tsm
influx_tsm: multiple improvements
2016-03-01 08:30:22 -05:00
Ross McDonald e2dcdcf79b Pinning golang.org/x/tools dependency in preparation for Go 1.4 EOL. 2016-02-29 16:19:06 -06: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
Mark Rushakoff 70fbc46282 Merge pull request #5844 from influxdata/mr-tsm-stats-tag-db-rp
Tag TSM stats with database and retention policy
2016-02-29 09:33:51 -08:00
Mark Rushakoff cdcb079769 Tag TSM stats with database, retention policy
... by extracting the db/rp from the given path.

Now that the code has "standardized" on extracting db/rp this way, the
ShardLocation struct is no longer necessary and thus has been removed.
We're back on the previous style of passing the path and walPath to
NewShard.
2016-02-29 09:17:34 -08:00
Jason Wilder 42eb2db665 Merge pull request #5860 from influxdata/jw-builds
Update circle ci build envs
2016-02-29 10:17:01 -07:00
Jason Wilder 2433975a26 Update circle ci build envs
* Remove go tip
* Test with go1.6
2016-02-29 09:22:59 -07:00
Jon Seymour a01d02066d Update CHANGELOG for issue #5854 (PR #5855)
Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-29 20:37:51 +11:00
Jon Seymour 73b3a2a056 Merge #5855 (issue: #5854).
RHS merges cleanly with 0.10.0

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2016-02-29 20:37:32 +11:00
Jon Seymour 716cdd7f41 tsm: modify encoding tests to deal with possible nil slices from testing.quick.Check in go master
The current go compiler at the tip of the go master (1d5001af) has a modified implementation of
testing.quick.Check that now generates nil slices as test data. (See: https://gophers.slack.com/archives/general/p14567053570110). The existing tests expect round tripping to work in this case
but it does not. So, in these cases we change the expectation to reflect actual behaviour.

This needs to be checked for reasonableness.
2016-02-29 20:36:19 +11:00
Ross McDonald f18d7e7596 Merge pull request #5849 from influxdata/ross-build-updates
Minor change to build.py
2016-02-26 15:10:47 -06:00
Ross McDonald 28965597fb Small fix for 'go get'/'gdm' call. Added verbose debug output to circle build output. 2016-02-26 12:32:37 -06:00
Jonathan A. Sternberg ba6186f199 Merge pull request #5815 from influxdata/js-5579-show-field-keys
Convert `SHOW FIELD KEYS` to the new query engine
2016-02-25 18:41:01 -05:00
Jonathan A. Sternberg aa0b603938 Convert `SHOW FIELD KEYS` to the new query engine
Fixes #5579.
2016-02-25 18:31:02 -05:00
Jonathan A. Sternberg 1cec8e730d Merge pull request #5843 from influxdata/js-fix-remote-point-decoder
Fix remote execution for partially replicated clusters
2016-02-25 18:30:43 -05:00