summaryrefslogtreecommitdiff
path: root/internal/clients/maprclient.go
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-07-03 14:13:13 +0100
committerPaul Buetow <pbuetow@mimecast.com>2020-08-13 11:37:24 +0100
commitc5a0ba7d29da7effa0ae18bffa10fc0be359b8e7 (patch)
treede4874740a5ddeb6eb29c887f6e121c61a1f8f3c /internal/clients/maprclient.go
parent8f9f9766cecec4a42ffb4d14ba9b7efc2ed204ad (diff)
bump up version to 3.0.0. can run continuous background mapreduce queries, useful for log file monitorig for example. breaking protocol change which allows to mapreduce aggreate messages containing the default field separator |. add of more unit tests. add logformat mapreduce query keyword. add set mapreduce clause support and support to evaluate built-in functions such as md5sum() and maskdigits().v3.0.0
Diffstat (limited to 'internal/clients/maprclient.go')
-rw-r--r--internal/clients/maprclient.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/clients/maprclient.go b/internal/clients/maprclient.go
index e28dadb..c6c341b 100644
--- a/internal/clients/maprclient.go
+++ b/internal/clients/maprclient.go
@@ -14,11 +14,15 @@ import (
"github.com/mimecast/dtail/internal/omode"
)
+// MaprClientMode determines whether to use cumulative mode or not.
type MaprClientMode int
const (
- DefaultMode MaprClientMode = iota
- CumulativeMode MaprClientMode = iota
+ // DefaultMode behaviour
+ DefaultMode MaprClientMode = iota
+ // CumulativeMode means results are added to prev interval
+ CumulativeMode MaprClientMode = iota
+ // NonCumulativeMode means results are from 0 for each interval
NonCumulativeMode MaprClientMode = iota
)
@@ -60,6 +64,8 @@ func NewMaprClient(args Args, queryStr string, maprClientMode MaprClientMode) (*
cumulative = args.Mode == omode.MapClient || query.HasOutfile()
}
+ logger.Debug("Cumulative mapreduce mode?", cumulative)
+
c := MaprClient{
baseClient: baseClient{
Args: args,