Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Fixed/Implemented Chunked Read.#585

Closed
gopalkpd wants to merge2 commits intoinfluxdata:masterfromgopalkpd:master

Conversation

gopalkpd
Copy link

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”.

gopalkcfxand others added2 commitsMay 3, 2018 18:31
The document mentions that InfluxDBClient.Query method returns one ResultSet per data chunkif chunking is enabled by setting the chunked parameter to True. But only one ResultSet containing alldata 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 methodby 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 yieldsone 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 methodto support streaming by adding the parameter “stream”.
hrbonz added a commit to hrbonz/influxdb-python that referenced this pull requestSep 8, 2019
When querying large data sets, it's vital to get a chunked responses tomanage memory usage. Wrapping the query response in a generator andstreaming the request provides the desired result.It also fixes `InfluxDBClient.query()` behavior for chunked queries thatis currently not working according to[specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L410)closeinfluxdata#585closeinfluxdata#531
hrbonz added a commit to hrbonz/influxdb-python that referenced this pull requestSep 8, 2019
When querying large data sets, it's vital to get a chunked responses tomanage memory usage. Wrapping the query response in a generator andstreaming the request provides the desired result.It also fixes `InfluxDBClient.query()` behavior for chunked queries thatis currently not working according to[specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L410)closeinfluxdata#585closeinfluxdata#531
hrbonz added a commit to hrbonz/influxdb-python that referenced this pull requestSep 8, 2019
When querying large data sets, it's vital to get a chunked responses tomanage memory usage. Wrapping the query response in a generator andstreaming the request provides the desired result.It also fixes `InfluxDBClient.query()` behavior for chunked queries thatis currently not working according to[specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L410)closeinfluxdata#585closeinfluxdata#531
@psy0rz
Copy link

Isnt this trying to fix the same thing as#538 ?

hrbonz added a commit to hrbonz/influxdb-python that referenced this pull requestMar 23, 2020
When querying large data sets, it's vital to get a chunked responses tomanage memory usage. Wrapping the query response in a generator andstreaming the request provides the desired result.It also fixes `InfluxDBClient.query()` behavior for chunked queries thatis currently not working according to[specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429)closeinfluxdata#585closeinfluxdata#531
hrbonz added a commit to hrbonz/influxdb-python that referenced this pull requestMar 23, 2020
When querying large data sets, it's vital to get a chunked responses tomanage memory usage. Wrapping the query response in a generator andstreaming the request provides the desired result.It also fixes `InfluxDBClient.query()` behavior for chunked queries thatis currently not working according to[specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429)closeinfluxdata#585closeinfluxdata#531
@sebito91sebito91 self-assigned thisApr 8, 2020
@sebito91
Copy link
Contributor

Duplicate of#538.

sebito91 pushed a commit that referenced this pull requestApr 10, 2020
When querying large data sets, it's vital to get a chunked responses tomanage memory usage. Wrapping the query response in a generator andstreaming the request provides the desired result.It also fixes `InfluxDBClient.query()` behavior for chunked queries thatis 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 requestApr 13, 2020
When querying large data sets, it's vital to get a chunked responses tomanage memory usage. Wrapping the query response in a generator andstreaming the request provides the desired result.It also fixes `InfluxDBClient.query()` behavior for chunked queries thatis currently not working according to[specs](https://github.com/influxdata/influxdb-python/blob/master/influxdb/client.py#L429)Closesinfluxdata#585.Closesinfluxdata#531.Closesinfluxdata#538.
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees

@sebito91sebito91

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@gopalkpd@psy0rz@sebito91@gopalkcfx

[8]ページ先頭

©2009-2025 Movatter.jp