You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by rmarsch <gi...@git.apache.org> on 2015/10/22 20:26:43 UTC
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
GitHub user rmarsch opened a pull request:
https://github.com/apache/spark/pull/9228
[SPARK-11261] [Core] Provide a more flexible alternative to Jdbc RDD
-Provide JdbcPartitioningRDD that allows fine grained control of the
queries run per Spark partition against the JDBC datastore.
-Supports dynamic placeholders with `SetPlaceholder` and the related
`insertStatementSetPlaceholders` method on the companion object along with overriding the default constructor argument `setupPlaceholders`.
Disclaimer: This contribution is my original work and I license the work to the project under the project's open source license.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rmarsch/spark jdbc-partitioning-rdd
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9228.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9228
----
commit bf672734f97026020a6a33808af389b48851f013
Author: rmarsch <rm...@localytics.com>
Date: 2015-10-22T18:17:29Z
[SPARK-11261] [Core] Provide a more flexible alternative to Jdbc RDD
-Provide JdbcPartitioningRDD that allows fine grained control of the
queries run per Spark partition against the JDBC datastore.
-Supports dynamic placeholders with SetPlaceholder and the related
insertStatemtneSetPlaceholders method.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
Posted by rmarsch <gi...@git.apache.org>.
Github user rmarsch commented on the pull request:
https://github.com/apache/spark/pull/9228#issuecomment-150322051
I'll have to do some investigating and get back with an answer. We don't use the spark-sql component currently, just core.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
Posted by rmarsch <gi...@git.apache.org>.
Github user rmarsch closed the pull request at:
https://github.com/apache/spark/pull/9228
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
Posted by rmarsch <gi...@git.apache.org>.
Github user rmarsch commented on the pull request:
https://github.com/apache/spark/pull/9228#issuecomment-150336499
Reading through `DataFrameReader` and `JDBCRDD` in spark-sql, it seems like the JDBC data source could be a workaround. I wouldn't consider it ideal though to have to pull in spark-sql just for these semantics if as a user you are only using RDD and the core library.
In my opinion, if JdbcRDD is going to exist and be supported in `org.apache.spark.rdd` it would be good to have a means that supports finer-grained partitioning. Having seen how spark-sql does the predicates, that seems less complicated than what I came up with here. The main distinction being I was trying to use the `PreparedStatement` to provide more safety against SQL injection. However, than introduces quite a bit more complexity to the API and usability.
I'll wait to see if there is any agreement that it would still be useful to have finer-grained JDBC usage via the RDD API. If so, I think I'd prefer aligning with how spark-sql does the predicates than what I came up with.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:
https://github.com/apache/spark/pull/9228#issuecomment-150314065
Can one of the admins verify this patch?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:
https://github.com/apache/spark/pull/9228#issuecomment-150460521
We are migrating most structured data processing to Spark SQL. I think this is best addressed by the JDBC data source there. It also saves us the hassle of maintaining two things at the same time. Overtime the existing JDBCRDD will probably be deprecated.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
Posted by rmarsch <gi...@git.apache.org>.
Github user rmarsch commented on the pull request:
https://github.com/apache/spark/pull/9228#issuecomment-150586870
Alright, that's a bit disappointing but I understand.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request: [SPARK-11261] [Core] Provide a more flexible a...
Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/9228#issuecomment-150317175
Without having looked at your code at all, I have one high-level question: is your use-case addressed by Spark SQL's built-in JDBC data source? I think that we're generally preferring to extend that rather than to build on top of the old JdbcRDD.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org