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

Added support for and AvroFileWriter #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Crystark
Copy link

Hi,

I did this some time ago and I thought you might be interested in having this in suro's master branch.
It's a basic avro file writer that you can use when configuring your sink. The schema must be provided as part of the configuration.

For instance

  "item-local-sink": {
        "type": "local",
        "maxFileSize": "1048576000",
        "rotationPeriod": "PT1m",
        "outputDir": "/data/surodata/local/item",
        "writer": {
            "type": "avro",
            "schema": "{\"type\":\"record\",\"name\":\"Item\",\"namespace\":\"my.app.namespace\",\"fields\":[{\"name\":\"timestamp\",\"type\":\"long\"},{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"description\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"option\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"type\",\"type
\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"price\",\"type\":[\"null\",\"float\"],\"default\":null}]}"
        }
   }

This is pretty basic but it's been really useful in our case.

@cloudbees-pull-request-builder

NetflixOSS » suro » suro-pull-requests #71 FAILURE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

suro-pull-requests #239 FAILURE
Looks like there's a problem with this pull request

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.

2 participants