Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use compressed ingress log with mac fix #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

de-code
Copy link
Contributor

@de-code de-code commented Jul 6, 2022

fix for #7 that was failing on a Mac

When calling zcat file.gz on a Mac, zcat is actually looking for the file file.gz.Z (not sure who thought this was a good idea).

This link describes the issue and potential solutions:

https://serverfault.com/questions/570024/zcat-gzcat-works-in-linux-not-on-osx-general-linux-osx-compatibility

Passing in the data via pipe is one solution.

gunzip -c should also work equivalent to zcat on Linux.

de-code added 2 commits July 6, 2022 14:20
* compress ingress log before upload to reduce bandwidth

* introduced CLOUDWATCH_JSONL_GZ_FILE to reduce hardcoding

* moved gzip compression down

* generate schema from compressed ingress log

* generate gzipped ingress jsonl file

* compress intermediate ingress jsonl files

* avoid uncompressing cloudwatch logs

* introduced input variable for clarity

* introduced target file variable for more clarity

* added logging of intermediate connversions

* using shell parameter expansion for readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant