pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <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="9f5fprn" 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="bv79jpt" 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="rbvhrrf" 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'>

                            主站蜘蛛池模板: 上海深蓝_缠绕机_缠膜机-上海深蓝机械装备有限公司 | 手术室净化厂家_成都实验室装修公司_无尘车间施工单位_洁净室工程建设团队-四川华锐16年行业经验 | 河南橡胶接头厂家,河南波纹补偿器厂家,河南可曲挠橡胶软连接,河南套筒补偿器厂家-河南正大阀门 | 烟台游艇培训,威海游艇培训-烟台市邮轮游艇行业协会 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | 膏剂灌装旋盖机-眼药水灌装生产线-西林瓶粉剂分装机-南通博琅机械科技 | 二手色谱仪器,十万分之一分析天平,蒸发光检测器,电位滴定仪-湖北捷岛科学仪器有限公司 | Safety light curtain|Belt Sway Switches|Pull Rope Switch|ultrasonic flaw detector-Shandong Zhuoxin Machinery Co., Ltd | 防锈油-助焊剂-光学玻璃清洗剂-贝塔防锈油生产厂家 | 苗木价格-苗木批发-沭阳苗木基地-沭阳花木-长之鸿园林苗木场 | 高速龙门架厂家_监控杆_多功能灯杆_信号灯杆_锂电池太阳能路灯-鑫世源照明 | 贴板式电磁阀-不锈钢-气动上展式放料阀-上海弗雷西阀门有限公司 工业机械三维动画制作 环保设备原理三维演示动画 自动化装配产线三维动画制作公司-南京燃动数字 | loft装修,上海嘉定酒店式公寓装修公司—曼城装饰 | 污水处理设备维修_污水处理工程改造_机械格栅_过滤设备_气浮设备_刮吸泥机_污泥浓缩罐_污水处理设备_污水处理工程-北京龙泉新禹科技有限公司 | 安平县鑫川金属丝网制品有限公司,声屏障,高速声屏障,百叶孔声屏障,大弧形声屏障,凹凸穿孔声屏障,铁路声屏障,顶部弧形声屏障,玻璃钢吸音板 | 郑州外墙清洗_郑州玻璃幕墙清洗_郑州开荒保洁-河南三恒清洗服务有限公司 | HYDAC过滤器,HYDAC滤芯,现货ATOS油泵,ATOS比例阀-东莞市广联自动化科技有限公司 | 昆明化妆培训-纹绣美甲-美容美牙培训-昆明博澜培训学校 | 湖南自考_湖南自学考试| 筒瓦厂家-仿古瓦-寺庙-古建琉璃瓦-宜兴市古典园林建筑陶瓷厂有限公司 | 华中线缆有限公司-电缆厂|电缆厂家|电线电缆厂家 | 宜兴紫砂壶知识分享 - 宜兴壶人| 合肥展厅设计-安徽展台设计-合肥展览公司-安徽奥美展览工程有限公司 | 水厂自动化|污水处理中控系统|水利信息化|智慧水务|智慧农业-山东德艾自动化科技有限公司 | 拖链电缆_柔性电缆_伺服电缆_坦克链电缆-深圳市顺电工业电缆有限公司 | 肉嫩度仪-凝胶测试仪-国产质构仪-气味分析仪-上海保圣实业发展有限公司|总部 | 烟台金蝶财务软件,烟台网站建设,烟台网络推广 | TTCMS自助建站_网站建设_自助建站_免费网站_免费建站_天天向上旗下品牌 | 【连江县榕彩涂料有限公司】官方网站| 短信通106短信接口验证码接口群发平台_国际短信接口验证码接口群发平台-速度网络有限公司 | 对辊式破碎机-对辊制砂机-双辊-双齿辊破碎机-巩义市裕顺机械制造有限公司 | 苏州防水公司_厂房屋面外墙防水_地下室卫生间防水堵漏-苏州伊诺尔防水工程有限公司 | 细沙回收机-尾矿干排脱水筛设备-泥石分离机-建筑垃圾分拣机厂家-青州冠诚重工机械有限公司 | 培训无忧网-教育培训咨询招生第三方平台| 镀锌角钢_槽钢_扁钢_圆钢_方矩管厂家_镀锌花纹板-海邦钢铁(天津)有限公司 | 烟台螺纹,烟台H型钢,烟台钢材,烟台角钢-烟台市正丰金属材料有限公司 | 齿式联轴器-弹性联轴器-联轴器厂家-江苏诺兴传动联轴器制造有限公司 | 耐火浇注料-喷涂料-浇注料生产厂家_郑州市元领耐火材料有限公司 耐力板-PC阳光板-PC板-PC耐力板 - 嘉兴赢创实业有限公司 | 不锈钢螺丝,不锈钢螺栓,不锈钢标准件-江苏百德特种合金有限公司 交变/复合盐雾试验箱-高低温冲击试验箱_安奈设备产品供应杭州/江苏南京/安徽马鞍山合肥等全国各地 | 超声骨密度仪-动脉硬化检测仪器-人体成分分析仪厂家/品牌/价格_南京科力悦 | 天津蒸汽/热水锅炉-电锅炉安装维修直销厂家-天津鑫淼暖通设备有限公司 |