• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

spark-shell本地启动报java错误本地windows安装spark在控制台输入spark-shell出错StringIndexOutOf Bounds Exception

武飞扬头像
哒哒~哒
帮助1

前提:本地java、hadoop已经安装好,但本地cmd启动spark-shell报出下面错误,我的配置是hadoop2.7、spark-2.3.1。

提示:没有配置好hadoop、spark(两者版本有联系,有对应)请先在本地安装好hadoop、spark。

出错原因:本地java版本过高.

处理方法:降低java版本到java8。如果不想影响你之前的java环境配置,你可以在本地多安一个java,想用哪个就到环境变量里面修改路径即可。

java8百度云资源:

链接: https://pan.百度.com/s/1U4p8U8_DgDkOmK8xNiMlWw 提取码: q2pe 

报错信息:

Exception in thread "'main" jav a . lang . Except ionInIn it ialize rError
at org . apache . hadoop . ut il. Str ingUt ils. <c linit ><Str ingUt ils. Jjava :80
at org apac he . hadoop secur it y- Secur it yUt il . getAut hent ic at ionMe t hod(Securit yUt il. java:611)
at org . apac he . hadoop . secur ity. UserGrowpI nf ormat ion . init ialize (UserGroupInf ornat ion . java :273)
at org apac he . hadoop secur it y . Use rGroupInf ornat ion ensure Init ialized (Use rGroupInf ormat ion .java:261) 
at org . apac he . hadoop . security . Use rGroupI nf ormat ion . log inUse rFromSub.jec t (Use rGroupInf ormat ion . java:791>
at org . apac he . hadoop . secur ity . UserGroupI nf ormat ion . get LogrinUser<UserGroupInf ormat ion . java:761)
at org . apac he . hadoop . secur ity . Use rGroupI nf ormat ion ge tCurrentUser(Use rGroupInf ormat ion . java:634)
at org . apac he .s park . ut i1.Ut ils 5 anonf un李ge tCurentUse rNane$1. app1y<Ut ils . scala 2467)
at org . apache .spark. ut i1. Ut ils字$ anonf unSge tCurrentUse rName$1. appIy(Ut ils .scala:2467>
at scala . Opt ion . getOrElse KOpt ion. scala :121)
at org . apac he .s park . ut i1.Ut ils$ . ge tCurrentUse rNane (Ut ils . scala:2467)
at org . apac he . s park . Secur it yManager < in it >(Secur it yManager .sc ala : 220)
at org . apac he - s park . deploy . S parkSubmits - secMgrS 1z ycompute51 <S parkSwbmit - scala :408)
at org . apache . spark deplo y . S parkSubmit$ .org'$ apac hes s parks de plo y$S parkSubmit5$s ecMgr51(S parkSubnit .sc ala : 408 )
at org apac he . spark . deploy. SparkSubmit5 5anonf un$ doPre pareSubmit Env ironnent$? .app1y(S parkSubmit .scala:416>
at org . apac he . s park . deploy . SparkSubmit$$ anonf un$doPre pare Submit Enu ironnent$? . app1y<SparkSubmit . scala:416>
at scala. Opt ion map(Opt ion . scala:146
at org . apac he . spark . dep1o y . SparkSubmit$ . doPre pareSubmit Env ironnent <SparkSubmit . scala:415)
at org . apac he - s park . deploy . S parkSubmits - pre pare Submit Env ironment (S parkSubmit . scala :250)
at org . apac he . spark . deploy . Sparkubmit$ . submit (SparkSubmit . scala:171 >
at org . apac he . s park . deploy . SparkSubmit5. main (SparkSubmit . scala:137)
at org . apac he . s park . deploy . s parkSubmit . ma in (S parkSubmit . scala)
Caused by: java. lang . Str ingI nde xOutOf Bounds Exception: begin 日. end 3. length 2
at java . base/ jaua. lang . S tr ing chec kBounds Beg inEnd<S tr ing . java:3734)
at java base/ java . lang . Str ing . subs tr ing<Str ing. jaua:1903)
at org - apac he - hadoop . ut il Shel1. <c linit>(She 11. java:52)
22 more


学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhggjjkb
系列文章
更多 icon
同类精品
更多 icon
继续加载