-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in_http: Fix "ignored parser options" problem on bulk insertion
What used to happen is that options in the <parser> section get ignored when we send events as a JSON array. This occurs because parser plugins are designed to handle a single hash value and do not generallly handle an array input well. Until now, we have tried to solve this issue by emulating the semantics of parser plugins in Fluent::Plugin::HttpInput (see 1afbfb1, 39f3a0d and f560017). However, this approach turned out to be error prone and rather tedious. This patch takes a different approach: - Whenever @parser is available, reuse @parser.convert_values() by manually applying it to each record in an input array. - Otherwise, fall back to the current logic. ... and should solve this class of issues. Signed-off-by: Fujimoto Seiji <fujimoto@clear-code.com>
- Loading branch information
Fujimoto Seiji
committed
Jul 5, 2018
1 parent
9ee8db3
commit 2e5f963
Showing
2 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters