You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Mohamed ismail <mi...@yahoo.com.INVALID> on 2016/09/19 17:15:29 UTC

NumberFormatException: For input string: "0.00000"

Hi all

I am trying to read: 

sc.textFile(DataFile).mapPartitions(lines => {
                    val parser = new CSVParser(",")
                    lines.map(line=>parseLineToTuple(line, parser))
                    })
Data looks like:
android phone,0,0,0,,0,0,0,0,0,0,0,5,0,0,0,5,0,0.00000,0.00000,0.00000,0.00000,0.00000,0,0,0,0,0,0,0,0.00000,0,0,0
ios phone,0,-1,0,,0,0,0,0,0,0,1,0,0,0,0,1,0,0.00000,0.00000,0.00000,0.00000,0.00000,0,0,0,0,0,0,0,0.00000,0,0,0

org.apache.spark.SparkException: Job aborted due to stage failure: Task 1 in stage 23055.0 failed 4 times, most recent failure: Lost task 1.3 in stage 23055.0 (TID 191607, ): 
java.lang.NumberFormatException: For input string: "0.00000"

Has anyone faced such issues. Is there a solution?

Thanks,
Mohamed


Re: NumberFormatException: For input string: "0.00000"

Posted by Hyukjin Kwon <gu...@gmail.com>.
It seems not an issue in Spark. Does "CSVParser" works fine without Spark
with the data?

BTW, it seems there is something wrong with your email address. I am
sending this again.

On 20 Sep 2016 8:32 a.m., "Hyukjin Kwon" <gu...@gmail.com> wrote:

> It seems not an issue in Spark. Does "CSVParser" works fine without Spark
> with the data?
>
> On 20 Sep 2016 2:15 a.m., "Mohamed ismail" <mi...@yahoo.com.invalid>
> wrote:
>
>> Hi all
>>
>> I am trying to read:
>>
>> sc.textFile(DataFile).mapPartitions(lines => {
>>                     val parser = new CSVParser(",")
>>                     lines.map(line=>parseLineToTuple(line, parser))
>>                     })
>> Data looks like:
>> android phone,0,0,0,,0,0,0,0,0,0,0,5,0,0,0,5,0,0.00000,0.00000,0.000
>> 00,0.00000,0.00000,0,0,0,0,0,0,0,0.00000,0,0,0
>> ios phone,0,-1,0,,0,0,0,0,0,0,1,0,0,0,0,1,0,0.00000,0.00000,0.00
>> 000,0.00000,0.00000,0,0,0,0,0,0,0,0.00000,0,0,0
>>
>> org.apache.spark.SparkException: Job aborted due to stage failure: Task
>> 1 in stage 23055.0 failed 4 times, most recent failure: Lost task 1.3 in
>> stage 23055.0 (TID 191607, ):
>> java.lang.NumberFormatException: For input string: "0.00000"
>>
>> Has anyone faced such issues. Is there a solution?
>>
>> Thanks,
>> Mohamed
>>
>>

Re: NumberFormatException: For input string: "0.00000"

Posted by Hyukjin Kwon <gu...@gmail.com>.
It seems not an issue in Spark. Does "CSVParser" works fine without Spark
with the data?

On 20 Sep 2016 2:15 a.m., "Mohamed ismail" <mi...@yahoo.com.invalid>
wrote:

> Hi all
>
> I am trying to read:
>
> sc.textFile(DataFile).mapPartitions(lines => {
>                     val parser = new CSVParser(",")
>                     lines.map(line=>parseLineToTuple(line, parser))
>                     })
> Data looks like:
> android phone,0,0,0,,0,0,0,0,0,0,0,5,0,0,0,5,0,0.00000,0.00000,0.
> 00000,0.00000,0.00000,0,0,0,0,0,0,0,0.00000,0,0,0
> ios phone,0,-1,0,,0,0,0,0,0,0,1,0,0,0,0,1,0,0.00000,0.00000,0.
> 00000,0.00000,0.00000,0,0,0,0,0,0,0,0.00000,0,0,0
>
> org.apache.spark.SparkException: Job aborted due to stage failure: Task 1
> in stage 23055.0 failed 4 times, most recent failure: Lost task 1.3 in
> stage 23055.0 (TID 191607, ):
> java.lang.NumberFormatException: For input string: "0.00000"
>
> Has anyone faced such issues. Is there a solution?
>
> Thanks,
> Mohamed
>
>