load hdfs file into spark context
<p>I am new to spark/scala and need to load a file from hdfs to spark. I have a file in hdfs (<code>/newhdfs/abc.txt</code>), and I could see my file contents by using <code>hdfs dfs -cat /newhdfs/abc.txt</code></p>

<p>I did in below order to load the file into spark context</p>

<pre><code>spark-shell #It entered into scala console window

scala&gt; import org.apache.spark._; //Line 1
scala&gt; val conf=new SparkConf().setMaster("local[*]");
scala&gt; val sc = new SparkContext(conf);
scala&gt; val input=sc.textFile("hdfs:///newhdfs/abc.txt"); //Line 4
</code></pre>

<p>Once I hit enter on line 4, I am getting below message.</p>

<pre><code>input: org.apache.spark.rdd.RDD[String] = hdfs:///newhdfs/abc.txt MapPartitionsRDD[19] at textFile at &lt;console&gt;:27``
</code></pre>

<p>Is this a fatal error? What do I need to do to solve this?</p>

<p>(Using Spark-2.0.0 and Hadoop 2.7.0)</p>