Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.

Commit 7eca11e

Browse files
committed
parser_json: Document new stream_buffer_size param
See fluent/fluentd#2381 In addition to documenting the parameter, update the `in_exec` and `out_exec_filter` articles to provide a workaround for users encountering this problem. This note exists in the v0.12 version of the `in_exec` page but was absent in the v1.0 docs, so add the whole note. Closes #624 Signed-off-by: Ben Wheatley <[email protected]>
1 parent 2e23a10 commit 7eca11e

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

docs/v1.0/in_exec.txt

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ You can run a program periodically or permanently. To run periodically, please u
2525

2626
NOTE: Please see the <a href="config-file">Config File</a> article for the basic structure and syntax of the configuration file.
2727

28+
NOTE: When using the json format in &lt;parse&gt; section, this plugin uses the Yajl library to parse the program output. Yajl buffers data internally so the output isn't always instantaneous. See the LINK:[parser_json](parser_json#stream_buffer_size) documentation to adjust this.
29+
2830
## Plugin helpers
2931

3032
* [compat_parameters](api-plugin-helper-compat_parameters)

docs/v1.0/out_exec_filter.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The `out_exec_filter` Buffered Output plugin (1) executes an external program us
2727

2828
NOTE: Please see the LINK:[Config File](config-file) article for the basic structure and syntax of the configuration file.
2929

30-
NOTE: When using the json format in &lt;parse&gt; section, this plugin uses the Yajl library to parse the program output. Yajl buffers data internally so the output isn't always instantaneous.
30+
NOTE: When using the json format in &lt;parse&gt; section, this plugin uses the Yajl library to parse the program output. Yajl buffers data internally so the output isn't always instantaneous. See the LINK:[parser_json](parser_json#stream_buffer_size) documentation to adjust this.
3131

3232
## Supported modes
3333

docs/v1.0/parser_json.txt

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ See [Parse section configurations](parse-section)
1414

1515
Set JSON parser.
1616

17+
### stream_buffer_size
18+
19+
| type | default | version |
20+
|:-------:|:-------:|:-------:|
21+
| integer | 8192 | 1.4.3 |
22+
23+
The amount of data, in bytes, that the Yajl parser will wait for before parsing and emitting JSON objects.
24+
See the [Yajl documentation](https://www.rubydoc.info/github/brianmario/yajl-ruby/Yajl%2FParser:parse) for further details.
25+
26+
This will only take effect when the parser is being used to process an IO stream, e.g. in the context of the `out_exec_filter` or `in_exec` plugins.
27+
1728
## Example
1829

1930
:::text

0 commit comments

Comments
 (0)