You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2016/07/19 06:08:20 UTC

[jira] [Commented] (SPARK-16613) A bug in RDD pipe operation

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

Dongjoon Hyun commented on SPARK-16613:
---------------------------------------

Thank you for amazingly clean reporting. I could easily regenerate that. In 1.6 branch, the problem still exists. In the current master, I experienced `StackOverflowError`.
{code}
scala> val fstRdd = sc.parallelize(List("hi", "hello", "how", "are", "you"))
fstRdd: org.apache.spark.rdd.RDD[String] = ParallelCollectionRDD[0] at parallelize at <console>:24

scala> val pipeRdd = fstRdd.pipe("/Users/dongjoon/spark/len.sh")
java.lang.StackOverflowError
  at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.startBuilding(PropertyBasedCreator.java:130)
{code}
It's not final investigation, but it's worth to look inside.

> A bug in RDD pipe operation
> ---------------------------
>
>                 Key: SPARK-16613
>                 URL: https://issues.apache.org/jira/browse/SPARK-16613
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Alex Krasnyansky
>
> Suppose we have such Spark code
> {code}
> object PipeExample {
>   def main(args: Array[String]) {
>     val fstRdd = sc.parallelize(List("hi", "hello", "how", "are", "you"))
>     val pipeRdd = fstRdd.pipe("/Users/finkel/spark-pipe-example/src/main/resources/len.sh")
>     pipeRdd.collect.foreach(println)
>   }
> }
> {code}
> It uses a bash script to convert a string to its length.
> {code}
> #!/bin/sh
> read input
> len=${#input}
> echo $len
> {code}
> So far so good, but when I run the code, it prints incorrect output. For example:
> {code}
> 0
> 2
> 0
> 5
> 3
> 0
> 3
> 3
> {code}
> I expect to see
> {code}
> 2
> 5
> 3
> 3
> 3
> {code}
> which is correct output for the app. I think it's a bug. It's expected to see only positive integers and avoid zeros.
> Environment:
> 1. Spark version is 1.6.2
> 2. Scala version is 2.11.6



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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