Running wordcount on spark >>> lines = sc.textFile("README.md") >>> lines.count()
<blockquote>
  <p>Py4JJavaError: An error occurred while calling
  z:org.apache.spark.api.python.PythonRDD.collectAndServe. :
  org.apache.hadoop.mapred.InvalidInputException: Input path does not
  exist:
  file:/home/shubhranshu/Documents/spark/spark-1.6.1-bin-hadoop2.6/bin/README.md
    at
  org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:285)
    at
  org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:228)
    at
  org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:313)
    at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:199)
    at
  org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)
    at
  org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)
    at scala.Option.getOrElse(Option.scala:120)     at
  org.apache.spark.rdd.RDD.partitions(RDD.scala:237)    at
  org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:35)
    at
  org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)
    at
  org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)
    at scala.Option.getOrElse(Option.scala:120)     at
  org.apache.spark.rdd.RDD.partitions(RDD.scala:237)    at
  org.apache.spark.api.python.PythonRDD.getPartitions(PythonRDD.scala:58)
    at
  org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)
    at
  org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)
    at scala.Option.getOrElse(Option.scala:120)     at
  org.apache.spark.rdd.RDD.partitions(RDD.scala:237)    at
  org.apache.spark.SparkContext.runJob(SparkContext.scala:1929)     at
  org.apache.spark.rdd.RDD$$anonfun$collect$1.apply(RDD.scala:927)  at
  org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
    at
  org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:111)
    at org.apache.spark.rdd.RDD.withScope(RDD.scala:316)    at
  org.apache.spark.rdd.RDD.collect(RDD.scala:926)   at
  org.apache.spark.api.python.PythonRDD$.collectAndServe(PythonRDD.scala:405)
    at
  org.apache.spark.api.python.PythonRDD.collectAndServe(PythonRDD.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)     at
  py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:231)  at
  py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:381)    at
  py4j.Gateway.invoke(Gateway.java:259)     at
  py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
    at py4j.commands.CallCommand.execute(CallCommand.java:79)   at
  py4j.GatewayConnection.run(GatewayConnection.java:209)    at
  java.lang.Thread.run(Thread.java:745)</p>
</blockquote>