spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jun Ye (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SPARK-16599) java.util.NoSuchElementException: None.get at at org.apache.spark.storage.BlockInfoManager.releaseAllLocksForTask(BlockInfoManager.scala:343)
Date Wed, 01 Feb 2017 02:23:51 GMT

    [ https://issues.apache.org/jira/browse/SPARK-16599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847889#comment-15847889
] 

Jun Ye edited comment on SPARK-16599 at 2/1/17 2:23 AM:
--------------------------------------------------------

I got the same exception with the following code: 

(My Spark version is 2.1.0. Scala version: 2.11.8. Hadoop version: 2.7.3)

{code}
case class MyClass(id:Int, name: String)

val myDF = sparkSession.sparkContext
.textFile("s3a://mys3bucket/myTextFile.txt")
.map(_.split("\t"))
.map(_.map(_.trim))
.map(a => MyClass(a(0).toInt, a(1)))
.toDF
{code}

The exception only happened at the following line 
{code}
.map(a => MyClass(a(0).toInt, a(1)))
{code}
If I removed this line, there is no exception. 

So I change to the following to bypass this exception.
{code}
val myDF = sparkSession.sparkContext
.textFile("s3a://mys3bucket/myTextFile.txt")
.map(_.split("\t"))
.map(_.map(_.trim))
.map {
  case a: Array[String] => (a(0).toInt, a(1))
}.toDF("id", "name")
{code}

It works for me.





was (Author: yetsun):
I got the same exception with the following code: 

(My Spark version is 2.1.0. Scala version: 2.11.8. Hadoop version: 2.7.3)

{code:scala}
case class MyClass(id:Int, name: String)

val myDF = sparkSession.sparkContext
.textFile("s3a://mys3bucket/myTextFile.txt")
.map(_.split("\t"))
.map(_.map(_.trim))
.map(a => MyClass(a(0).toInt, a(1)))
.toDF
{code}

The exception only happened at the following line 
{code:scala}
.map(a => MyClass(a(0).toInt, a(1)))
{code}
If I removed this line, there is no exception. 

So I change to the following to bypass this exception.
{code:scala}
val myDF = sparkSession.sparkContext
.textFile("s3a://mys3bucket/myTextFile.txt")
.map(_.split("\t"))
.map(_.map(_.trim))
.map {
  case a: Array[String] => (a(0).toInt, a(1))
}.toDF("id", "name")
{code}

It works for me.




> java.util.NoSuchElementException: None.get  at at org.apache.spark.storage.BlockInfoManager.releaseAllLocksForTask(BlockInfoManager.scala:343)
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-16599
>                 URL: https://issues.apache.org/jira/browse/SPARK-16599
>             Project: Spark
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>         Environment: centos 6.7   spark 2.0
>            Reporter: binde
>
> run a spark job with spark 2.0, error message
> Job aborted due to stage failure: Task 0 in stage 821.0 failed 4 times, most recent failure:
Lost task 0.3 in stage 821.0 (TID 1480, e103): java.util.NoSuchElementException: None.get
> 	at scala.None$.get(Option.scala:347)
> 	at scala.None$.get(Option.scala:345)
> 	at org.apache.spark.storage.BlockInfoManager.releaseAllLocksForTask(BlockInfoManager.scala:343)
> 	at org.apache.spark.storage.BlockManager.releaseAllLocksForTask(BlockManager.scala:644)
> 	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:281)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message