Commit Graph

41 Commits (29c2dbc6239f98a2777ed742641c1cfcfb704308)

Author SHA1 Message Date
Jonathan A. Sternberg 5d4ecf853c Add continuous query option for customizing resampling
This makes the following syntax possible:

    CREATE CONTINUOUS QUERY mycq ON mydb
        RESAMPLE EVERY 1m FOR 1h
        BEGIN
          SELECT mean(value) INTO cpu_mean FROM cpu GROUP BY time(5m)
        END

The RESAMPLE option customizes how often an interval will be sampled and
the duration. The interval is customized with EVERY. Any intervals
within the resampling duration on a multiple of the resample interval
will be updated with the new results from the query.

The duration is customized with FOR. This determines how long an
interval will participate in resampling.

Both options are optional. If RESAMPLE is in the syntax, at least one of
the two needs to be given. The default for both is the interval of the
continuous query.

The service also improves tracking of the last run time and the logic of
when a query for an interval should be run. When determining the oldest
interval to run for a query, the continuous query service determines
what would have been the optimal time to perform the next query based on
the last run time. It then uses this time to determine the oldest
interval that should be run using the resample duration and will
resample all intervals between this time and the current time as opposed
to potentially forgetting about the last run in an interval if the
continuous query service gets delayed for some reason.

This removes the previous config options for customizing continuous
queries since they are no longer relevant and adds a new option of
customizing the run interval. The run interval determines how often the
continuous query service polls for when it should execute a query. This
option defaults to 1s, but can be set to 1m if the least common factor
of all continuous queries' intervals is a higher value (like 1m).
2015-12-28 16:43:49 -05:00
Mateusz Dymiński 8090ba6830 SHOW SHARD GROUPS 2015-11-14 22:27:24 +01:00
David Norton a3d127f797 Revert "add RENAME DATABASE"
This reverts commit 7212bfce83.

Conflicts:
	influxql/parser.go
	influxql/token.go
	meta/internal/meta.pb.go
	meta/internal/meta.proto
2015-10-20 09:01:34 -04:00
linearb 7212bfce83 add RENAME DATABASE 2015-10-09 13:55:38 -04:00
Nick Dawbarn 26f6d00668 Bugfix for #3429 String representations of RegexLiterals generated in influxql/ast.go add the / char as a start and end delimiter, but does not escape any / characters that may exist with the regex 2015-10-08 19:41:36 +10:00
Philip O'Toole 2ac0357406 Support dropping non-Raft nodes 2015-10-04 00:19:52 -07:00
Philip O'Toole d74e0690c7 Revert "Merge pull request #4233 from influxdb/drop-server"
This reverts commit 0bdb36f6dc, reversing
changes made to 3085fbc138.
2015-10-02 08:39:57 -07:00
Cory LaNou 205c7674f6 add drop server tests 2015-10-01 15:39:14 -05:00
Ben Johnson bbc5539517 add SHOW SHARDS statement
This commit adds the ability to list all shards in the cluster
and return their id, start time, end time, expiry time, and
owner ids. Shards are grouped by database.

Fixes #3562
2015-09-03 15:46:52 -06:00
Philip O'Toole 1228c985ea Parser support for CREATE DATABASE IF NOT EXISTS 2015-08-28 19:04:50 -07:00
Josh Horwitz 96938e8a2b Added check for escaped single quote in string 2015-07-22 17:47:48 -04:00
David Norton 775e3d9e55 fix #2281: passthru escapes when parsing regex 2015-05-04 16:04:12 -04:00
Marcos Lilljedahl 2bac1a8097 Add test for REGEX operators 2015-04-20 19:43:06 -03:00
David Norton c2b61af3a1 fix #2224: make influxql keywords case insensitive 2015-04-09 16:08:28 -04:00
David Norton 25cea58635 refactor scanning & parsing of identifiers 2015-04-09 13:21:13 -04:00
Philip O'Toole e07aeaa030 Unit test leading underscore as IDENTs 2015-03-26 13:11:11 -07:00
Joseph Rothrock bcad98c902 malformed identifiers get through
Issue: 1768

We weren't checking return codes from scanString.
Added text descriptions for BADSTRING and BADESCAPE tokens.
2015-02-27 13:33:36 -08:00
David Norton 2cf41d6ea9 influxql: fix WHERE TAG KEY parsing 2015-01-28 05:02:36 -05:00
David Norton 780831bb17 change LIST to SHOW 2015-01-25 22:56:20 -05:00
David Norton ab39d471a3 influxql: add OFFSET 2015-01-25 15:34:49 -05:00
Ben Johnson 3c8c8724ed Implement full ident scanning, single quote strings. 2015-01-19 13:05:38 -07:00
Ben Johnson 10075ea8c5 Remove debugging. 2015-01-19 11:28:31 -07:00
Ben Johnson 81f457907f Add measurement normalization and identifier splitting. 2015-01-18 14:45:22 -07:00
David Norton 9e3ca7b569 influxql: add LIST USERS statement 2015-01-14 11:53:17 -05:00
David Norton d514cd03c8 influxql: add LIST RETENTION POLICIES statement 2015-01-13 15:40:43 -05:00
David Norton 05e2bff6c4 influxql: add LIST DATABASES statement 2015-01-09 18:21:12 -05:00
David Norton 3b649d3e63 influxql: add CREATE CONTINUOUS QUERY (WIP) 2015-01-09 18:21:12 -05:00
David Norton f23417fa5a influxql: add CREATE CONTINUOUS QUERY, : separator 2015-01-09 18:21:12 -05:00
David Norton d6aa34e840 influxql: add ALTER RETENTION POLICY statement 2015-01-05 13:24:50 -05:00
David Norton 96e8f96d13 influxql: add CREATE RETENTION POLICY statement 2015-01-04 21:50:56 -05:00
David Norton 87922c4202 influxql: add GRANT statement 2015-01-03 02:06:47 -05:00
David Norton b2a2b73bd9 influxql: add tokens for user & DB admin 2015-01-03 02:06:47 -05:00
Ben Johnson d92d0d4737 Fix NEQ: Change != to <> 2014-12-21 10:43:03 -07:00
Ben Johnson 6c6bb92a1b Add join support.
This commit adds the ability to join multiple measurements together and calculate aggregate
function expressions.
2014-12-19 21:36:52 -07:00
David Norton 3deb2bb132 go fmt 2014-12-16 09:06:51 -05:00
David Norton 6f3ba3efdb influxql: change ORDER BY to accept a field list
Change ORDER BY to accept a field list and change LIST SERIES
statement to allow ORDER BY.
2014-12-16 09:06:51 -05:00
David Norton 74ade8cffb Add LIST related tokens to scanner 2014-12-16 09:06:50 -05:00
Ben Johnson 91f16db3af Add LIST/DROP SERIES and LIST/DROP CONTINUOUS QUERIES. 2014-11-22 16:33:21 -07:00
Ben Johnson 1ca44658e5 Add semicolon, INSERT, INTO to Scanner. 2014-11-20 08:02:47 -07:00
Ben Johnson f94b588013 Fix EQ token scanning. 2014-11-19 17:16:38 -07:00
Ben Johnson 3d612fafbf Add InfluxQL scanner.
This commit adds a pure Go implementation of the InfluxQL scanner. It includes support for:

- Identifiers
- Numbers
- Strings
- Durations
- Booleans
- Numeric and logical operators
- InfluxQL keywords
2014-11-19 16:47:46 -07:00