Skip to content

Commit b1dee3f

Browse files
cosmo0920esmerel
andcommitted
out_s3: Add an instruction for enabling parquet compression
- Apply suggestion from @esmerel Co-authored-by: Lynette Miles <[email protected]> Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 2dee9d8 commit b1dee3f

File tree

1 file changed

+55
-2
lines changed

1 file changed

+55
-2
lines changed

pipeline/outputs/s3.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Send logs, data, and metrics to Amazon S3
66

77
![AWS logo](../../.gitbook/assets/image%20(9).png)
88

9-
The _Amazon S3_ output plugin lets you ingest records into the [S3](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) cloud object store.
9+
The _Amazon S3_ output plugin lets you ingest records into the [S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) cloud object store.
1010

1111
The plugin can upload data to S3 using the [multipart upload API](https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) or [`PutObject`](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html). Multipart is the default and is recommended. Fluent Bit will stream data in a series of _parts_. This limits the amount of data buffered on disk at any point in time. By default, every time 5&nbsp;MiB of data have been received, a new part will be uploaded. The plugin can create files up to gigabytes in size from many small chunks or parts using the multipart API. All aspects of the upload process are configurable.
1212

@@ -36,7 +36,7 @@ The [Prometheus success/retry/error metrics values](../../administration/monitor
3636
| `blob_database_file` | Absolute path to a database file to be used to store blob files contexts. | _none_ |
3737
| `bucket` | S3 Bucket name | _none_ |
3838
| `canned_acl` | [Predefined Canned ACL policy](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) for S3 objects. | _none_ |
39-
| `compression` | Compression type for S3 objects. `gzip`, `arrow`, `parquet` and `zstd` are the supported values, `arrow` and `parquet` are only available if Apache Arrow was enabled at compile time. Defaults to no compression. | _none_ |
39+
| `compression` | Compression/format for S3 objects. Supported: `gzip` (always available) and `parquet` (requires Arrow build). For `gzip`, the `Content-Encoding` header is set to `gzip`. `parquet` is available **only when Fluent Bit is built with `-DFLB_ARROW=On`** and Arrow GLib/Parquet GLib are installed. Parquet is typically used with `use_put_object On`. | _none_ |
4040
| `content_type` | A standard MIME type for the S3 object, set as the Content-Type HTTP header. | _none_ |
4141
| `endpoint` | Custom endpoint for the S3 API. Endpoints can contain scheme and port. | _none_ |
4242
| `external_id` | Specify an external ID for the STS API. Can be used with the `role_arn` parameter if your role requires an external ID. | _none_ |
@@ -695,3 +695,56 @@ The following example uses `pyarrow` to analyze the uploaded data:
695695
3 2021-04-27T09:33:56.539430Z 0.0 0.0 0.0 0.0 0.0 0.0
696696
4 2021-04-27T09:33:57.539803Z 0.0 0.0 0.0 0.0 0.0 0.0
697697
```
698+
699+
## Enable Parquet support
700+
701+
### Build requirements for Parquet
702+
703+
To enable Parquet, build Fluent Bit with Apache Arrow support and install Arrow GLib/Parquet GLib:
704+
705+
```bash
706+
# Ubuntu/Debian example
707+
sudo apt-get update
708+
sudo apt-get install -y -V ca-certificates lsb-release wget
709+
wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
710+
sudo apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
711+
sudo apt-get update
712+
sudo apt-get install -y -V libarrow-glib-dev libparquet-glib-dev
713+
714+
# Build Fluent Bit with Arrow:
715+
cd build/
716+
cmake -DFLB_ARROW=On ..
717+
cmake --build .
718+
```
719+
720+
For other Linux distributions, refer [the document for installation instructions of Apache Parquet](https://arrow.apache.org/install/).
721+
Apache Parquet GLib is a part of Apache Arrow project.
722+
723+
### Testing Parquet compression
724+
725+
## Testing (Parquet)
726+
727+
Example configuration:
728+
729+
```yaml
730+
service:
731+
flush: 5
732+
daemon: Off
733+
log_level: debug
734+
http_server: Off
735+
736+
pipeline:
737+
inputs:
738+
- name: dummy
739+
tag: dummy.local
740+
dummy {"boolean": false, "int": 1, "long": 1, "float": 1.1, "double": 1.1, "bytes": "foo", "string": "foo"}
741+
742+
outputs:
743+
- name: s3
744+
match: dummy*
745+
region: us-east-2
746+
bucket: <your_testing_bucket>
747+
use_put_object: On
748+
compression: parquet
749+
# other parameters
750+
```

0 commit comments

Comments
 (0)