-
Notifications
You must be signed in to change notification settings - Fork 45
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
Sink Writer to write in batches #42
Comments
Hi @talsheldon I will replay to you after dec 20th, when i will be back from my vacations. |
Hi @talsheldon
Yes this is correct. Currently, Http Sink splits collection or requests passed from Flink Via AsyncSink/AsyncSinkWriter into individual requests. The reason for that was, that back in that time, this was what we needed in our project. The web service that we were suppose to send requests was unable to handle "batch" requests. It simply does not understand a REST Body containing an array of individual requests.
Yes this is something that would be a good enhancement for the connector, totally agree. On the first glance the change we have to implement is twofold. We would have to refactor JavaNetSinkHttpClient::submitRequests method that currently is spiting colletion of elements to individual http reqeusts and also think a little bit about setElementConverter. If you would be interested in contribution let me know. |
Does the current version support this feature? |
Hi @shmilygkd unfortunately this feature is still not supported. Maybe I will be able to find some time to work on it in upcoming future or maybe you would be interested in contribution? On the first glance the change we have to implement is twofold. We would have to refactor JavaNetSinkHttpClient::submitRequests method that currently is spiting colletion of elements to individual http reqeusts and also think a little bit about setElementConverter. If you would be interested in contribution let me know. |
Well, let's synchronize if there is progress. |
@shmilygkd actually I started working on this as we speak :) |
Looking forward to it! |
It is expected to be ready sometime next week. |
This will be released in 0.10.0, currently available on 0.10.0-snapshot |
@talsheldon @shmilygkd |
@kristoffSC good job~ |
My understanding is that for every single element (from upstream) there will be an HTTP request for it.
So basically every value from upstream is 1
HttpSinkRequestEntry
, which translates later into 1 HTTP request whensubmitRequestEntries
finally executes.I'd like to have less HTTP requests, and batch these requests to a single HTTP request (data to form a list). e.g. a single HTTP request for a batch of size
maxBatchSize
.How could I achieve that?
The text was updated successfully, but these errors were encountered: