-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10040][SQL] Use batch insert for JDBC writing #8273
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might not need to have a configuration for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should batch size be increased to 10,000 since its big data ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. :-)
|
Test build #41121 has finished for PR 8273 at commit
|
|
retest this please. |
|
Test build #41140 has finished for PR 8273 at commit
|
|
Test build #41200 has finished for PR 8273 at commit
|
|
retest this please. |
|
Test build #41210 has finished for PR 8273 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about allowing users to configure this value rather than use fixed value(10000) to avoid OOM?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it might not worth adding a configuration for it before. But seems it is hard to decide a proper batch size now. So I add a configuration as you suggested. Thanks.
|
/CC @rxin |
|
Test build #41257 has finished for PR 8273 at commit
|
|
will this pr be merged into branch-1.5?I need it. |
|
Sorry this is too late for merging into branch-1.5. We can consider this for master (1.6). |
|
@rxin , thanks for your reply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are the other properties called? do they start with "jdbc"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think no. Just use "batchsize"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that sounds good.
|
LGTM. |
|
Thanks - I've merged this. |
|
Test build #41355 has finished for PR 8273 at commit
|
JIRA: https://issues.apache.org/jira/browse/SPARK-10040
We should use batch insert instead of single row in JDBC.