summaryrefslogtreecommitdiff
path: root/internal/mapr
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-08-28 20:26:32 +0100
committerPaul Buetow <paul@buetow.org>2021-08-28 20:28:34 +0100
commit23982f331c2154a66b86d596226c24454fd06be5 (patch)
treef8aa72eb5110a4de914f28a063b528fd166a3a6b /internal/mapr
parent8c2e94030d0e31289c35fcfb56499707fd4a7ccd (diff)
1. Major performance gain by not checking for file truncation aftter
each bytes read. 2. Introduce field separator to the protocol package.
Diffstat (limited to 'internal/mapr')
-rw-r--r--internal/mapr/logformat/default.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/mapr/logformat/default.go b/internal/mapr/logformat/default.go
index 44bf558..32a34bd 100644
--- a/internal/mapr/logformat/default.go
+++ b/internal/mapr/logformat/default.go
@@ -3,12 +3,14 @@ package logformat
import (
"errors"
"strings"
+
+ "github.com/mimecast/dtail/internal/protocol"
)
// MakeFieldsDEFAULT is the default log file mapreduce parser.
func (p *Parser) MakeFieldsDEFAULT(maprLine string) (map[string]string, error) {
fields := make(map[string]string, 20)
- splitted := strings.Split(maprLine, "|")
+ splitted := strings.Split(maprLine, protocol.FieldDelimiter)
fields["*"] = "*"
fields["$line"] = maprLine