You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/10/29 13:39:58 UTC

[GitHub] [hudi] hj2016 opened a new issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

hj2016 opened a new issue #2215:
URL: https://github.com/apache/hudi/issues/2215


   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://cwiki.apache.org/confluence/display/HUDI/FAQ)?
   
   - Join the mailing list to engage in conversations and get faster support at dev-subscribe@hudi.apache.org.
   
   - If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
   
   **Describe the problem you faced**
   
   1. Use Kafka as the data source and use spark streamming to write to hudi. After about 10 days of execution, the spark dirver memory overflows.
   2. Dump spark dirver memory found that the memory of spark dirver is set to 4g, while the memory of HoodieLogFormatWriter object is occupied by more than 3g.
   ![内存溢出](https://user-images.githubusercontent.com/18521084/97580447-48f89300-1a2e-11eb-92ee-1e420ac442f9.png)
   
   3.Analyzing the source code of HoodieLogFormatWriter, HoodieLogFormatWriter object will be constructed every time the metadata is submitted by commit. As spark streamming submits more and more batches, it leads to the accumulation of HoodieLogFormatWriter objects. GC does not seem to be able to perform garbage collection.
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   
   
   **Expected behavior**
   
   A clear and concise description of what you expected to happen.
   
   **Environment Description**
   
   * Hudi version :0.5.2
   
   * Spark version :2.4.0
   
   * Hive version :2.1.1
   
   * Hadoop version :3.0.0
   
   * Storage (HDFS/S3/GCS..) :hdfs
   
   * Running on Docker? (yes/no) :no
   
   
   **Additional context**
   
   Question 1: Has the problem been fixed in the higher version?
   Question 2: The HoodieLogFormatWriter object internally refers to a global object, which causes gc to fail to reclaim the object. I feel that setting the object to null after the HoodieLogFormatWriter object executes the close method can fix the problem. Does this have any other impact?
   ![image](https://user-images.githubusercontent.com/18521084/97581062-14d1a200-1a2f-11eb-9a1d-d7e70ebcabcd.png)
   
   
   **Stacktrace**
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hj2016 commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
hj2016 commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-719142649


   @bvaradar   Ok, let me verify.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] ygordefraga commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
ygordefraga commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-762379385


   @vinothchandar @bvaradar Hey guys, just to help you. I have the same problem when executing a streaming writing into a hudi table for a while.
   
   ![Screenshot from 2021-01-18 14-11-26](https://user-images.githubusercontent.com/20543207/104945788-f9c05f80-5997-11eb-93ab-86e9fc13b05b.png)
   
   Any updates about the solution? Affected versions? I use 0.5.3 currently.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] wxplovecc commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
wxplovecc commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-921608329


   @bvaradar  I have the same problem in 0.9.0 release
   ![memory leak](https://user-images.githubusercontent.com/3350718/133750266-4010e6f0-3e65-496b-b5fd-e45390f0543b.png)
   ![16318671581489](https://user-images.githubusercontent.com/3350718/133750509-8b268e77-28c7-4ccb-a7b8-2ce82b6dc252.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] danny0405 edited a comment on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
danny0405 edited a comment on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-963761223


   @wxplovecc I have fired a fix here https://github.com/apache/hudi/pull/3951
   please verify if it can solve your problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] wxplovecc edited a comment on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
wxplovecc edited a comment on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-921608329


   @bvaradar  I have the same problem in 0.9.0 release
   ![memory leak](https://user-images.githubusercontent.com/3350718/133750266-4010e6f0-3e65-496b-b5fd-e45390f0543b.png)
   ![企业微信截图_16318714201895](https://user-images.githubusercontent.com/3350718/133761628-ebda6371-099a-409b-8263-1e54d9776815.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] bvaradar closed issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
bvaradar closed issue #2215:
URL: https://github.com/apache/hudi/issues/2215


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hj2016 commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
hj2016 commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-724422128


   @bvaradar  You missed the DiskBasedMap object.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] bvaradar commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
bvaradar commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-725893631


   No worries @vinothchandar .
   
   @hj2016 : Opened a new PR https://github.com/apache/hudi/pull/2249 Also identified one more place where this could happen and did the similar fix.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] danny0405 commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
danny0405 commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-963761223


   @wxplovecc I have fired a fix here https://github.com/apache/hudi/pull/3951/files,please verify if it can solve your problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] danny0405 edited a comment on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
danny0405 edited a comment on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-963761223


   @wxplovecc I have fired a fix here https://github.com/apache/hudi/pull/3951/files
   please verify if it can solve your problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] bvaradar commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
bvaradar commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-724237421


   @hj2016 : Apologies. I missed seeing your comment. I have update the PR to take care of this. Can you kindly try. I will go ahead and merge the PR to master once the unit-test passes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] vinothchandar commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
vinothchandar commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-724426008


   @bvaradar may be I jumped the gun and merged the PR? :( . Feel free to do a follow on


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hj2016 commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
hj2016 commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-724422796


   @bvaradar I tried to modify it and tested it in version 0.5.2, no problem


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hj2016 commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
hj2016 commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-719466640


   I tried to run the spark task for several hours, the HoodieLogFormatWriter object problem was solved, but I found a new problem. Many Hbase ShutdownHook objects cannot be released. Need to removeShutDownHook thread。
   ![image](https://user-images.githubusercontent.com/18521084/97693034-823b0c80-1adb-11eb-8bed-63040c9207c3.png)
   ![image](https://user-images.githubusercontent.com/18521084/97693251-dcd46880-1adb-11eb-8489-e806d2320ce0.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] bvaradar commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
bvaradar commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-719038361


   I made a quick PR to fix this issue in master - https://github.com/apache/hudi/pull/2217 
   @hj2016  : Can you try this and see if this solves the memory leak ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] bvaradar commented on issue #2215: [SUPPORT] Spark driver memory overflows after using spark streaming for a long time

Posted by GitBox <gi...@apache.org>.
bvaradar commented on issue #2215:
URL: https://github.com/apache/hudi/issues/2215#issuecomment-762383532


   The fixes are available in 0.7.0 which is in the process of getting released. The release branch will be cut in couple of days (https://lists.apache.org/thread.html/r3473e0aea28a2ffb050a650a09f93b8fabdcef0d456d71afba6c2694%40%3Cdev.hudi.apache.org%3E)
   
   Balaji.V


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org