You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2016/06/27 14:25:52 UTC
[jira] [Commented] (SPARK-16226) change the way of JDBC commit
[ https://issues.apache.org/jira/browse/SPARK-16226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351111#comment-15351111 ]
Sean Owen commented on SPARK-16226:
-----------------------------------
Then, however, committing a partition wouldn't be atomic. If it fails partway through you would re-insert some records that were already committed. I don't think it can work otherwise.
> change the way of JDBC commit
> -----------------------------
>
> Key: SPARK-16226
> URL: https://issues.apache.org/jira/browse/SPARK-16226
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6.2
> Reporter: lihongli
>
> In the file spark/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala,we have the method savePartition().We can create JDBC connection with each partition.But when I insert data to my relational DB,it is blocked.I found that we commit once in a partition.Then I changed it.I commit
> after executeBatch() and my code worked properly.I did not know how it performed in NoSQL database,but it does have a problem in my relational DB.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org