Skip to content

[SPARK-14204] [SQL] register driverClass rather than user-specified class #14420

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

Closed

Conversation

mchalek
Copy link
Contributor

@mchalek mchalek commented Jul 30, 2016

This is a pull request that was originally merged against branch-1.6 as #12000, now being merged into master as well. @srowen @zzcclp @JoshRosen

This pull request fixes an issue in which cluster-mode executors fail to properly register a JDBC driver when the driver is provided in a jar by the user, but the driver class name is derived from a JDBC URL (rather than specified by the user). The consequence of this is that all JDBC accesses under the described circumstances fail with an IllegalStateException. I reported the issue here: https://issues.apache.org/jira/browse/SPARK-14204

My proposed solution is to have the executors register the JDBC driver class under all circumstances, not only when the driver is specified by the user.

This patch was tested manually. I built an assembly jar, deployed it to a cluster, and confirmed that the problem was fixed.

@srowen
Copy link
Member

srowen commented Jul 30, 2016

Jenkins test this please

@SparkQA
Copy link

SparkQA commented Jul 30, 2016

Test build #63043 has finished for PR 14420 at commit c0bd08e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zzcclp
Copy link
Contributor

zzcclp commented Aug 1, 2016

@srowen will this pr be meged into branch-2.0?

@srowen
Copy link
Member

srowen commented Aug 1, 2016

I'll wait a moment to see if @JoshRosen has concerns about it. The original change was approved, for branch 1.6, but in re-reading, I wonder if it was only accidentally discussed as 1.6-only.

@zzcclp
Copy link
Contributor

zzcclp commented Aug 2, 2016

@JoshRosen can you have a look at this pr?

@srowen
Copy link
Member

srowen commented Aug 3, 2016

Going once going twice; I don't see a reason to not merge to master as well.

asfgit pushed a commit that referenced this pull request Aug 3, 2016
This is a pull request that was originally merged against branch-1.6 as #12000, now being merged into master as well.  srowen zzcclp JoshRosen

This pull request fixes an issue in which cluster-mode executors fail to properly register a JDBC driver when the driver is provided in a jar by the user, but the driver class name is derived from a JDBC URL (rather than specified by the user). The consequence of this is that all JDBC accesses under the described circumstances fail with an IllegalStateException. I reported the issue here: https://issues.apache.org/jira/browse/SPARK-14204

My proposed solution is to have the executors register the JDBC driver class under all circumstances, not only when the driver is specified by the user.

This patch was tested manually. I built an assembly jar, deployed it to a cluster, and confirmed that the problem was fixed.

Author: Kevin McHale <kevin@premise.com>

Closes #14420 from mchalek/mchalek-jdbc_driver_registration.

(cherry picked from commit 685b08e)
Signed-off-by: Sean Owen <sowen@cloudera.com>
@srowen
Copy link
Member

srowen commented Aug 3, 2016

Merged to master/2.0 (previously merged to 1.6)

@asfgit asfgit closed this in 685b08e Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants