This repository was archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 524
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The document mentions that InfluxDBClient.Query method returns one ResultSet per data chunk if chunking is enabled by setting the chunked parameter to True. But only one ResultSet containing all data rows was being returned. This in effect is like having no chunking and retrieving all data in one shot. Also, for chunked data read to work, streaming should be enabled on the underlying requests.Session.request method by setting the stream parameter to True. This was not being done. Made the following changes to make the chunked read work as documented. * Updated the method _read_chunked_response to make it a generator that yields one ResultSet per data chunk. * Enabling streaming on requests.Session.request by passing the parameter “stream=True” whenever chunking is enabled on InfluxDBClient.Query. * Updated the entire call chain from InfluxDBClient.Query to requests.Session.request method to support streaming by adding the parameter “stream”.
hrbonz
added a commit
to hrbonz/influxdb-python
that referenced
this pull request
Sep 8, 2019
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L410) close influxdata#585 close influxdata#531
hrbonz
added a commit
to hrbonz/influxdb-python
that referenced
this pull request
Sep 8, 2019
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L410) close influxdata#585 close influxdata#531
hrbonz
added a commit
to hrbonz/influxdb-python
that referenced
this pull request
Sep 8, 2019
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L410) close influxdata#585 close influxdata#531
Isnt this trying to fix the same thing as #538 ? |
hrbonz
added a commit
to hrbonz/influxdb-python
that referenced
this pull request
Mar 23, 2020
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429) close influxdata#585 close influxdata#531
hrbonz
added a commit
to hrbonz/influxdb-python
that referenced
this pull request
Mar 23, 2020
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429) close influxdata#585 close influxdata#531
Duplicate of #538. |
sebito91
pushed a commit
that referenced
this pull request
Apr 10, 2020
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429) Closes #585. Closes #531. Closes #538.
ocworld
pushed a commit
to AhnLab-OSS/influxdb-python
that referenced
this pull request
Apr 13, 2020
When querying large data sets, it's vital to get a chunked responses to manage memory usage. Wrapping the query response in a generator and streaming the request provides the desired result. It also fixes `InfluxDBClient.query()` behavior for chunked queries that is currently not working according to [specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429) Closes influxdata#585. Closes influxdata#531. Closes influxdata#538.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The document mentions that InfluxDBClient.Query method returns one ResultSet per data chunk
if chunking is enabled by setting the chunked parameter to True. But only one ResultSet containing all
data rows was being returned. This in effect is like having no chunking and retrieving all data in one shot.
Also, for chunked data read to work, streaming should be enabled on the underlying requests.Session.request method
by setting the stream parameter to True. This was not being done.
Made the following changes to make the chunked read work as documented.
Updated the method _read_chunked_response to make it a generator that yields
one ResultSet per data chunk.
Enabling streaming on requests.Session.request by passing the parameter “stream=True”
whenever chunking is enabled on InfluxDBClient.Query.
Updated the entire call chain from InfluxDBClient.Query to requests.Session.request method
to support streaming by adding the parameter “stream”.