GitHub user yueqianzhu opened a pull request:

    https://github.com/apache/spark/pull/9515

    [SPARK-11547] set fetchSize default value in JDBCRDD

    if I do not set any properties manual for jdbc, when I show the data in the 
table, it will throw an exception like below:
    Exception in thread "main" java.lang.NullPointerException
        at java.util.Hashtable.putAll(Hashtable.java:522)
        at org.apache.spark.sql.DataFrameReader.jdbc(DataFrameReader.scala:205)
        at org.apache.spark.sql.DataFrameReader.jdbc(DataFrameReader.scala:130)
    
    my test code:
    //sqlContext : An existing SparkContext
        val df1 = 
sqlContext.read.jdbc("jdbc:mysql://IP:PORT/XXX?user=XXX&password=XXX","tablename",null)
        df1.show
    
    This PR Makes it easier to operate, especially for a novice.
    https://issues.apache.org/jira/browse/SPARK-11547

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yueqianzhu/spark my_change

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/9515.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 #9515
    
----
commit 7a1b8223c1c4adf88e26e03d99ac2380532c4055
Author: yueqian_zhu <yueqian_...@163.com>
Date:   2015-11-06T03:35:59Z

    set fetchSize in file JDBCRDD.scala default value to "10"

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to