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

  • <small id='9wo1T'></small><noframes id='9wo1T'>

    <legend id='9wo1T'><style id='9wo1T'><dir id='9wo1T'><q id='9wo1T'></q></dir></style></legend>
      <tfoot id='9wo1T'></tfoot>

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

          <bdo id='9wo1T'></bdo><ul id='9wo1T'></ul>
      1. Spark在執行jdbc保存時給出空指針異常

        Spark giving Null Pointer Exception while performing jdbc save(Spark在執行jdbc保存時給出空指針異常)

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

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

          <tfoot id='LfYHL'></tfoot>

              <tbody id='LfYHL'></tbody>
                • <bdo id='LfYHL'></bdo><ul id='LfYHL'></ul>
                  本文介紹了Spark在執行jdbc保存時給出空指針異常的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  當我執行以下代碼行時,我得到以下堆棧跟蹤:

                  Hi I am getting the following stack trace when I execute the following lines of code:

                  transactionDF.write.format("jdbc")
                          .option("url",SqlServerUri)
                          .option("driver", driver)
                          .option("dbtable", fullQualifiedName)
                          .option("user", SqlServerUser).option("password",SqlServerPassword)
                          .mode(SaveMode.Append).save()
                  

                  以下是堆棧跟蹤:

                  at org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificUnsafeProjection.apply_3$(Unknown Source)
                  at org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificUnsafeProjection.apply(Unknown Source)
                  at org.apache.spark.sql.execution.LocalTableScanExec$$anonfun$1.apply(LocalTableScanExec.scala:41)
                  at org.apache.spark.sql.execution.LocalTableScanExec$$anonfun$1.apply(LocalTableScanExec.scala:41)
                  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
                  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
                  at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
                  at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
                  at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
                  at scala.collection.AbstractTraversable.map(Traversable.scala:104)
                  at org.apache.spark.sql.execution.LocalTableScanExec.<init>(LocalTableScanExec.scala:41)
                  at org.apache.spark.sql.execution.SparkStrategies$BasicOperators$.apply(SparkStrategies.scala:394)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$1.apply(QueryPlanner.scala:62)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$1.apply(QueryPlanner.scala:62)
                  at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:434)
                  at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)
                  at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:439)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner.plan(QueryPlanner.scala:92)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$2$$anonfun$apply$2.apply(QueryPlanner.scala:77)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$2$$anonfun$apply$2.apply(QueryPlanner.scala:74)
                  at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
                  at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
                  at scala.collection.Iterator$class.foreach(Iterator.scala:893)
                  at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
                  at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:157)
                  at scala.collection.AbstractIterator.foldLeft(Iterator.scala:1336)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$2.apply(QueryPlanner.scala:74)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$2.apply(QueryPlanner.scala:66)
                  at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:434)
                  at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)
                  at org.apache.spark.sql.catalyst.planning.QueryPlanner.plan(QueryPlanner.scala:92)
                  at org.apache.spark.sql.execution.QueryExecution.sparkPlan$lzycompute(QueryExecution.scala:84)
                  at org.apache.spark.sql.execution.QueryExecution.sparkPlan(QueryExecution.scala:80)
                  at org.apache.spark.sql.execution.QueryExecution.executedPlan$lzycompute(QueryExecution.scala:89)
                  at org.apache.spark.sql.execution.QueryExecution.executedPlan(QueryExecution.scala:89)
                  at org.apache.spark.sql.execution.QueryExecution$$anonfun$toString$3.apply(QueryExecution.scala:237)
                  at org.apache.spark.sql.execution.QueryExecution$$anonfun$toString$3.apply(QueryExecution.scala:237)
                  at org.apache.spark.sql.execution.QueryExecution.stringOrError(QueryExecution.scala:112)
                  at org.apache.spark.sql.execution.QueryExecution.toString(QueryExecution.scala:237)
                  at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:54)
                  at org.apache.spark.sql.Dataset.withNewExecutionId(Dataset.scala:2788)
                  at org.apache.spark.sql.Dataset.foreachPartition(Dataset.scala:2319)
                  at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.saveTable(JdbcUtils.scala:670)
                  at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:77)
                  at org.apache.spark.sql.execution.datasources.DataSource.write(DataSource.scala:518)
                  at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:215)
                  at com.test.spark.jobs.ingestion.test$.main(test.scala:193)
                  at com.test.spark.jobs.ingestion.test.main(test.scala)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:498)
                  at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:743)
                  at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187)
                  at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212)
                  at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126)
                  at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
                  

                  我嘗試調試它,我相信查詢執行會給出空指針異常

                  I tried debugging it and I believe query execution is giving null pointer exception

                  我不確定這意味著什么.我在我的本地機器上運行它,而不是在任何集群上

                  I am not sure what it means. I am running this on my local machine and not on any cluster

                  任何幫助將不勝感激.

                  推薦答案

                  我想通了(Alteast 我認為這就是原因).對于面臨類似情況的其他人:在創建表時,我將每一列都設置為空,因此我認為它允許在表中插入空值.但是我正在構建數據框的 Avro 模式具有可空性 = false.因此,dataframe.create 正在讀取 null 并因此引發 NPE 錯誤.當我執行 Dataframe.write 時出現錯誤(這讓我認為這是一個 jdbc 錯誤)但實際的 NPE 在創建數據幀時發生

                  I figured it out (Alteast I think this is the reason). For others facing a similar situation: While I was creating the table, I made every column as null so I assumed it would allow null insertion in the table. But the Avro schema I was building the dataframe had nullable = false. So, dataframe.create was reading null and hence raising a NPE error. The error was raised when I did Dataframe.write (which made me think it was a jdbc error) but the actual NPE happened while creating the dataframe

                  這篇關于Spark在執行jdbc保存時給出空指針異常的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)
                  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 中,是否可以從外部數據庫獲取查詢(而不是獲取整個表)?) - IT屋-程序員軟件開
                  Break down a table to pivot in columns (SQL,PYSPARK)(分解表以按列進行透視(SQL、PYSPARK))

                          <tbody id='FdyCq'></tbody>
                        <tfoot id='FdyCq'></tfoot>
                        <i id='FdyCq'><tr id='FdyCq'><dt id='FdyCq'><q id='FdyCq'><span id='FdyCq'><b id='FdyCq'><form id='FdyCq'><ins id='FdyCq'></ins><ul id='FdyCq'></ul><sub id='FdyCq'></sub></form><legend id='FdyCq'></legend><bdo id='FdyCq'><pre id='FdyCq'><center id='FdyCq'></center></pre></bdo></b><th id='FdyCq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FdyCq'><tfoot id='FdyCq'></tfoot><dl id='FdyCq'><fieldset id='FdyCq'></fieldset></dl></div>
                          • <bdo id='FdyCq'></bdo><ul id='FdyCq'></ul>
                          • <legend id='FdyCq'><style id='FdyCq'><dir id='FdyCq'><q id='FdyCq'></q></dir></style></legend>
                          • <small id='FdyCq'></small><noframes id='FdyCq'>

                            主站蜘蛛池模板: 91高清在线观看 | 国产午夜精品一区二区三区在线观看 | 精品网站999www| 男女视频在线观看网站 | 91精品国产一区二区三区动漫 | 日韩一区二区三区在线看 | 久久久久国产一区二区三区四区 | 午夜三区 | 欧美精品在线播放 | 亚洲一区 中文字幕 | 国产精品成av人在线视午夜片 | 91在线| 国产免国产免费 | 99热99| 日本久久久久久久久 | 一区二区三区四区不卡 | 欧美jizzhd精品欧美巨大免费 | 日韩一二三 | 亚洲欧美一区在线 | 国产福利在线 | 亚洲国产一区二区在线 | 成人综合久久 | 国产日韩欧美在线观看 | 秋霞av国产精品一区 | 国产丝袜一区二区三区免费视频 | 日韩国产一区二区三区 | 国产精品久久av | 欧美精品一区二区三区在线四季 | 欧美人妇做爰xxxⅹ性高电影 | 亚洲精选久久 | 亚洲一区在线日韩在线深爱 | www亚洲精品 | 精品久久久久久亚洲精品 | 国产视频日韩 | 久久精品国产99国产精品 | 91精品麻豆日日躁夜夜躁 | 永久网站| 欧美成人第一页 | 欧美日韩一区二区在线观看 | 91一区二区 | 国产免费福利在线 |