Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-12088

check connection.isClose before connection.getAutoCommit in JDBCRDD.close

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.2, 1.6.0
    • 1.6.0, 2.0.0
    • SQL
    • None

    Description

      in JDBCRDD, it has

      if (!conn.getAutoCommit && !conn.isClosed) {
      try

      { conn.commit() }


      . . . . . .

      In my test, the connection is already closed so conn.getAutoCommit throw Exception. We should check !conn.isClosed before checking !conn.getAutoCommit to avoid the Exception.

      Attachments

        Activity

          People

            huaxingao Huaxin Gao
            huaxing Huaxin Gao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: