apache / doris-spark-connector

Spark Connector for Apache Doris
https://doris.apache.org/
Apache License 2.0
83 stars 98 forks source link

decrease memory usage when csv&gzip is on #212

Closed zhaorongsheng closed 5 months ago

zhaorongsheng commented 5 months ago

Proposed changes

Issue Number: close #211 211

Problem Summary:

Use row input stream instead of StringBuilder when write to gzip outputstream.

Checklist(Required)

  1. Does it affect the original behavior: (No)
  2. Has unit tests been added: (No Need)
  3. Has document been added or modified: (No Need)
  4. Does it need to update dependencies: (No)
  5. Are there any changes that cannot be rolled back: (No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

gnehil commented 5 months ago

Have you done any tests? If so, can you post the results?

zhaorongsheng commented 5 months ago

Have you done any tests? If so, can you post the results?

@gnehil We do not add test case for this case. But in our scene the spark executor will be OOM when using original code. And it has been run successfully when using the optimised code with the same data and conf.

gnehil commented 5 months ago

LGTM