Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions include/fluent-bit/aws/flb_aws_compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
#define FLB_AWS_COMPRESS_ZSTD 4
#define FLB_AWS_COMPRESS_SNAPPY 5

/* Parquet page-level compression codecs */
#define FLB_PARQUET_COMPRESSION_NONE 0
#define FLB_PARQUET_COMPRESSION_SNAPPY 1
#define FLB_PARQUET_COMPRESSION_GZIP 2
#define FLB_PARQUET_COMPRESSION_ZSTD 3
Comment on lines +32 to +35
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am less sure on introducing parquet/arrow specific compression constants. We are migrating to parquet/arrow being formats that can have compression applied on top.


/*
* Get compression type from compression keyword. The return value is used to identify
* what compression option to utilize.
Expand Down Expand Up @@ -63,4 +69,13 @@ int flb_aws_compression_b64_truncate_compress(int compression_type, size_t max_o
void *in_data, size_t in_len,
void **out_data, size_t *out_len);

/*
* Convert JSON data to Apache Parquet format with the specified
* page-level compression codec (FLB_PARQUET_COMPRESSION_*).
* Returns 0 on success, -1 on failure.
*/
int out_s3_compress_parquet(void *json, size_t size,
void **out_buf, size_t *out_size,
int parquet_compression);
Comment on lines +77 to +79
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we accept that we can apply compression on top of the existing formats then this method may not be needed long term


#endif
Loading
Loading