久久久久久久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在執(zhí)行jdbc保存時給出空指針異常

        Spark giving Null Pointer Exception while performing jdbc save(Spark在執(zhí)行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在執(zhí)行jdbc保存時給出空指針異常的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  當(dāng)我執(zhí)行以下代碼行時,我得到以下堆棧跟蹤:

                  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)
                  

                  我嘗試調(diào)試它,我相信查詢執(zhí)行會給出空指針異常

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

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

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

                  任何幫助將不勝感激.

                  推薦答案

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

                  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

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

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(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 個先前值來決定接下來的 N 個行)
                  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)是忽略整個事務(wù)還是只是有問題的行?) - IT屋-程序員軟件開發(fā)技
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數(shù)據(jù)庫表作為 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ù)庫獲取查詢(而不是獲取整個表)?) - IT屋-程序員軟件開
                  Break down a table to pivot in columns (SQL,PYSPARK)(分解表以按列進(jìn)行透視(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'>

                            主站蜘蛛池模板: 免费毛片www com cn | 涩涩鲁亚洲精品一区二区 | 欧美在线成人影院 | 国产精品久久影院 | 精品欧美一区二区三区久久久 | 免费三级网 | 狠狠色综合网站久久久久久久 | 午夜精品一区二区三区在线观看 | 成人一区av偷拍 | 精品久久久久久亚洲精品 | 国产一区二区三区免费观看视频 | 亚洲永久精品国产 | 99亚洲 | 欧美极品视频 | 91资源在线观看 | 毛片站| 青青草原精品99久久精品66 | 久久99精品久久久久久国产越南 | 精品视频一区二区 | 日本精品视频在线 | 国产乱码精品一区二区三区忘忧草 | 成人在线| 不卡视频一区二区三区 | 婷婷综合色 | 天堂久久网 | 国产精品日女人 | www久久久 | 老司机午夜性大片 | 久久精品小视频 | 亚洲一区二区在线视频 | www.久久| 精品欧美一区二区在线观看视频 | 国产亚洲精品区 | 亚洲日韩第一页 | 婷婷五月色综合香五月 | 九九免费视频 | 免费在线观看成人av | 国产亚洲一区二区三区在线观看 | av电影一区 | 亚洲一区视频 | 91在线观看免费视频 |