久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='LsVnD'><style id='LsVnD'><dir id='LsVnD'><q id='LsVnD'></q></dir></style></legend>
    • <bdo id='LsVnD'></bdo><ul id='LsVnD'></ul>

    1. <small id='LsVnD'></small><noframes id='LsVnD'>

        <i id='LsVnD'><tr id='LsVnD'><dt id='LsVnD'><q id='LsVnD'><span id='LsVnD'><b id='LsVnD'><form id='LsVnD'><ins id='LsVnD'></ins><ul id='LsVnD'></ul><sub id='LsVnD'></sub></form><legend id='LsVnD'></legend><bdo id='LsVnD'><pre id='LsVnD'><center id='LsVnD'></center></pre></bdo></b><th id='LsVnD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='LsVnD'><tfoot id='LsVnD'></tfoot><dl id='LsVnD'><fieldset id='LsVnD'></fieldset></dl></div>
        <tfoot id='LsVnD'></tfoot>

        SQLITE_ERROR:通過(guò) JDBC 從 Spark 連接到 SQLite 數(shù)據(jù)庫(kù)時(shí)

        SQLITE_ERROR: Connection is closed when connecting from Spark via JDBC to SQLite database(SQLITE_ERROR:通過(guò) JDBC 從 Spark 連接到 SQLite 數(shù)據(jù)庫(kù)時(shí),連接已關(guān)閉)
          <legend id='kKRMt'><style id='kKRMt'><dir id='kKRMt'><q id='kKRMt'></q></dir></style></legend>
            <bdo id='kKRMt'></bdo><ul id='kKRMt'></ul>

                <tbody id='kKRMt'></tbody>

                  <i id='kKRMt'><tr id='kKRMt'><dt id='kKRMt'><q id='kKRMt'><span id='kKRMt'><b id='kKRMt'><form id='kKRMt'><ins id='kKRMt'></ins><ul id='kKRMt'></ul><sub id='kKRMt'></sub></form><legend id='kKRMt'></legend><bdo id='kKRMt'><pre id='kKRMt'><center id='kKRMt'></center></pre></bdo></b><th id='kKRMt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kKRMt'><tfoot id='kKRMt'></tfoot><dl id='kKRMt'><fieldset id='kKRMt'></fieldset></dl></div>
                1. <tfoot id='kKRMt'></tfoot>
                2. <small id='kKRMt'></small><noframes id='kKRMt'>

                  本文介紹了SQLITE_ERROR:通過(guò) JDBC 從 Spark 連接到 SQLite 數(shù)據(jù)庫(kù)時(shí),連接已關(guān)閉的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我正在使用 Apache Spark 1.5.1 并嘗試連接到名為 clinton.db 的本地 SQLite 數(shù)據(jù)庫(kù).從數(shù)據(jù)庫(kù)表創(chuàng)建數(shù)據(jù)框工作正常,但是當(dāng)我對(duì)創(chuàng)建的對(duì)象執(zhí)行某些操作時(shí),我收到以下錯(cuò)誤消息,其中顯示SQL 錯(cuò)誤或丟失的數(shù)據(jù)庫(kù)(連接已關(guān)閉)".有趣的是,我還是得到了手術(shù)的結(jié)果.知道我可以做些什么來(lái)解決問(wèn)題,即避免錯(cuò)誤嗎?

                  I am using Apache Spark 1.5.1 and trying to connect to a local SQLite database named clinton.db. Creating a data frame from a table of the database works fine but when I do some operations on the created object, I get the error below which says "SQL error or missing database (Connection is closed)". Funny thing is that I get the result of the operation nevertheless. Any idea what I can do to solve the problem, i.e., avoid the error?

                  spark-shell 的啟動(dòng)命令:

                  Start command for spark-shell:

                  ../spark/bin/spark-shell --master local[8] --jars ../libraries/sqlite-jdbc-3.8.11.1.jar --classpath ../libraries/sqlite-jdbc-3.8.11.1.jar
                  

                  從數(shù)據(jù)庫(kù)中讀取:

                  val emails = sqlContext.read.format("jdbc").options(Map("url" -> "jdbc:sqlite:../data/clinton.sqlite", "dbtable" -> "Emails")).load()
                  

                  簡(jiǎn)單計(jì)數(shù)(失敗):

                  emails.count
                  

                  錯(cuò)誤:

                  15/09/30 09:06:39 WARN JDBCRDD:異常結(jié)束語(yǔ)句java.sql.SQLException: [SQLITE_ERROR] SQL 錯(cuò)誤或缺少數(shù)據(jù)庫(kù)(連接已關(guān)閉)在 org.sqlite.core.DB.newSQLException(DB.java:890)在 org.sqlite.core.CoreStatement.internalClose(CoreStatement.java:109)在 org.sqlite.jdbc3.JDBC3Statement.close(JDBC3Statement.java:35)在 org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1.org$apache$spark$sql$execution$datasources$jdbc$JDBCRDD$$anon$$close(JDBCRDD.scala:454)在 org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1$$anonfun$8.apply(JDBCRDD.scala:358)在 org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1$$anonfun$8.apply(JDBCRDD.scala:358)在 org.apache.spark.TaskContextImpl$$anon$1.onTaskCompletion(TaskContextImpl.scala:60)在 org.apache.spark.TaskContextImpl$$anonfun$markTaskCompleted$1.apply(TaskContextImpl.scala:79)在 org.apache.spark.TaskContextImpl$$anonfun$markTaskCompleted$1.apply(TaskContextImpl.scala:77)在 scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)在 scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)在 org.apache.spark.TaskContextImpl.markTaskCompleted(TaskContextImpl.scala:77)在 org.apache.spark.scheduler.Task.run(Task.scala:90)在 org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)在 java.lang.Thread.run(Thread.java:745)res1:長(zhǎng) = 7945

                  推薦答案

                  我遇到了同樣的錯(cuò)誤 今天,并且重要的一行就在異常之前:

                  I got the same error today, and the important line is just before the exception:

                  15/11/30 12:13:02 INFO jdbc.JDBCRDD:關(guān)閉連接

                  15/11/30 12:13:02 INFO jdbc.JDBCRDD: closed connection

                  15/11/30 12:13:02 WARN jdbc.JDBCRDD:異常結(jié)束語(yǔ)句java.sql.SQLException: [SQLITE_ERROR] SQL 錯(cuò)誤或缺少數(shù)據(jù)庫(kù)(連接已關(guān)閉)在 org.sqlite.core.DB.newSQLException(DB.java:890)在 org.sqlite.core.CoreStatement.internalClose(CoreStatement.java:109)在 org.sqlite.jdbc3.JDBC3Statement.close(JDBC3Statement.java:35)在 org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1.org$apache$spark$sql$execution$datasources$jdbc$JDBCRDD$$anon$$close(JDBCRDD.scala:454)

                  15/11/30 12:13:02 WARN jdbc.JDBCRDD: Exception closing statement java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (Connection is closed) at org.sqlite.core.DB.newSQLException(DB.java:890) at org.sqlite.core.CoreStatement.internalClose(CoreStatement.java:109) at org.sqlite.jdbc3.JDBC3Statement.close(JDBC3Statement.java:35) at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1.org$apache$spark$sql$execution$datasources$jdbc$JDBCRDD$$anon$$close(JDBCRDD.scala:454)

                  所以Spark成功關(guān)閉JDBC連接,然后關(guān)閉JDBC語(yǔ)句

                  So Spark succeeded to close the JDBC connection, and then it fails to close the JDBC statement

                  看源碼,close()被調(diào)用了兩次:

                  第 358 行(org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD,Spark 1.5.1)

                  Line 358 (org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD, Spark 1.5.1)

                  context.addTaskCompletionListener{ context => close() }
                  

                  第 469 行

                  override def hasNext: Boolean = {
                    if (!finished) {
                      if (!gotNext) {
                        nextValue = getNext()
                        if (finished) {
                          close()
                        }
                        gotNext = true
                      }
                    }
                    !finished
                  }
                  

                  如果您查看 close() 方法(第 443 行)

                  If you look at the close() method (line 443)

                  def close() {
                    if (closed) return
                  

                  您可以看到它檢查了變量 closed,但該值從未設(shè)置為 true.

                  you can see that it checks the variable closed, but that value is never set to true.

                  如果我沒(méi)看錯(cuò)的話,這個(gè)bug還在master里面.我已提交錯(cuò)誤報(bào)告.

                  If I see it correctly, this bug is still in the master. I have filed a bug report.

                  • 來(lái)源:JDBCRDD.scala(行號(hào)略有不同)
                  • Source: JDBCRDD.scala (lines numbers differ slightly)

                  這篇關(guān)于SQLITE_ERROR:通過(guò) JDBC 從 Spark 連接到 SQLite 數(shù)據(jù)庫(kù)時(shí),連接已關(guān)閉的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數(shù)根據(jù) N 個(gè)先前值來(lái)決定接下來(lái)的 N 個(gè)行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達(dá)式的結(jié)果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數(shù)的 ignore 選項(xiàng)是忽略整個(gè)事務(wù)還是只是有問(wèn)題的行?) - IT屋-程序員軟件開(kāi)發(fā)技
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調(diào)用 o23.load 時(shí)發(fā)生錯(cuò)誤 沒(méi)有合適的驅(qū)動(dòng)程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數(shù)據(jù)庫(kù)表作為 Spark 數(shù)據(jù)幀讀取?)
                  In Apache Spark 2.0.0, is it possible to fetch a query from an external database (rather than grab the whole table)?(在 Apache Spark 2.0.0 中,是否可以從外部數(shù)據(jù)庫(kù)獲取查詢(而不是獲取整個(gè)表)?) - IT屋-程序員軟件開(kāi)
                      <bdo id='c0z46'></bdo><ul id='c0z46'></ul>
                        <tbody id='c0z46'></tbody>

                        <tfoot id='c0z46'></tfoot>
                        <legend id='c0z46'><style id='c0z46'><dir id='c0z46'><q id='c0z46'></q></dir></style></legend>

                        <small id='c0z46'></small><noframes id='c0z46'>

                      1. <i id='c0z46'><tr id='c0z46'><dt id='c0z46'><q id='c0z46'><span id='c0z46'><b id='c0z46'><form id='c0z46'><ins id='c0z46'></ins><ul id='c0z46'></ul><sub id='c0z46'></sub></form><legend id='c0z46'></legend><bdo id='c0z46'><pre id='c0z46'><center id='c0z46'></center></pre></bdo></b><th id='c0z46'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='c0z46'><tfoot id='c0z46'></tfoot><dl id='c0z46'><fieldset id='c0z46'></fieldset></dl></div>

                          • 主站蜘蛛池模板: 国产一区二区视频免费在线观看 | 黄色一级大片在线免费看产 | 2022精品国偷自产免费观看 | 日韩精品欧美精品 | 欧美在线 | 日本视频一区二区 | 成人激情视频免费观看 | 欧美成人免费在线视频 | 岛国在线免费观看 | 日韩欧美三区 | 在线男人天堂 | 欧美日韩高清免费 | 亚洲午夜电影 | 免费在线成人 | 久久久国产一区二区三区 | 免费在线看黄 | 欧美一区二区网站 | 一区二区成人 | 亚洲h在线观看 | 国产精品久久久久久一区二区三区 | 99视频在线免费观看 | 成人一级黄色毛片 | 日本色婷婷| 亚洲国产aⅴ精品 | 中文在线播放 | 我我色综合 | 91福利网址| 中文字幕在线观看精品 | 亚洲精品国产成人 | 日本午夜免费福利视频 | 亚洲美女一区二区三区 | 日韩一区在线播放 | 国产一级片一区二区三区 | 四虎影视免费在线 | 国产一区二区三区久久久久久久久 | av片免费 | 成人免费视频网站在线观看 | 天天操夜夜爽 | 欧美一级大黄 | 丁香综合| 国产精品乱码一二三区的特点 |