You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by RK Spark <rk...@gmail.com> on 2016/07/15 08:05:36 UTC

Input path does not exist error in giving input file for word count program

val count = inputfile.flatMap(line => line.split(" ")).map(word =>
(word,1)).reduceByKey(_ + _);
org.apache.hadoop.mapred.InvalidInputException: Input path does not exist:

Re: Input path does not exist error in giving input file for word count program

Posted by Ted Yu <yu...@gmail.com>.
From examples/src/main/scala/org/apache/spark/examples/streaming/HdfsWordCount.scala
:

    val lines = ssc.textFileStream(args(0))
    val words = lines.flatMap(_.split(" "))

In your case, looks like inputfile didn't correspond to an existing path.

On Fri, Jul 15, 2016 at 1:05 AM, RK Spark <rk...@gmail.com> wrote:

> val count = inputfile.flatMap(line => line.split(" ")).map(word =>
> (word,1)).reduceByKey(_ + _);
> org.apache.hadoop.mapred.InvalidInputException: Input path does not exist:
>