<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question spark-shell directories lookup failure in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-shell-directories-lookup-failure/m-p/27507#M5924</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm newbie in spark. Please help me. I try to run simple script in spark-shell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import org.apache.spark.SparkFiles;
val inFile = sc.textFile(SparkFiles.get("test.data"));
inFile.first();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but on inFile.first() i got exception&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://hdp-7:8020/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is no such directory in HDFS, but i have directory on local fs :&amp;nbsp;/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04 with 0 files inside.&lt;/P&gt;&lt;P&gt;I suppose the troubles in spark-shell startup - i got line in start log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;15/05/15 16:08:24 INFO HttpFileServer: HTTP File server directory is /tmp/spark-d0ea3c3a-db92-43de-bc3d-6e6a6fd415f2&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems work directory created locally, but when i try get access to RDD it try get it from HDFS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://hdp-7:8020/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cloudera Express 5.3.2, spark was installed as yarn application in Cloudera Manager console.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;full log underline:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@hdp-16 ~]# spark-shell&lt;BR /&gt;15/05/15 16:08:19 INFO SecurityManager: Changing view acls to: root&lt;BR /&gt;15/05/15 16:08:19 INFO SecurityManager: Changing modify acls to: root&lt;BR /&gt;15/05/15 16:08:19 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)&lt;BR /&gt;15/05/15 16:08:19 INFO HttpServer: Starting HTTP Server&lt;BR /&gt;15/05/15 16:08:19 INFO Utils: Successfully started service 'HTTP class server' on port 39187.&lt;BR /&gt;Welcome to&lt;BR /&gt;____ __&lt;BR /&gt;/ __/__ ___ _____/ /__&lt;BR /&gt;_\ \/ _ \/ _ `/ __/ '_/&lt;BR /&gt;/___/ .__/\_,_/_/ /_/\_\ version 1.2.0-SNAPSHOT&lt;BR /&gt;/_/&lt;/P&gt;&lt;P&gt;Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_67)&lt;BR /&gt;Type in expressions to have them evaluated.&lt;BR /&gt;Type :help for more information.&lt;BR /&gt;15/05/15 16:08:24 INFO SecurityManager: Changing view acls to: root&lt;BR /&gt;15/05/15 16:08:24 INFO SecurityManager: Changing modify acls to: root&lt;BR /&gt;15/05/15 16:08:24 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)&lt;BR /&gt;15/05/15 16:08:24 INFO Slf4jLogger: Slf4jLogger started&lt;BR /&gt;15/05/15 16:08:24 INFO Remoting: Starting remoting&lt;BR /&gt;15/05/15 16:08:24 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriver@hdp-16:51885]&lt;BR /&gt;15/05/15 16:08:24 INFO Remoting: Remoting now listens on addresses: [akka.tcp://sparkDriver@hdp-16:51885]&lt;BR /&gt;15/05/15 16:08:24 INFO Utils: Successfully started service 'sparkDriver' on port 51885.&lt;BR /&gt;15/05/15 16:08:24 INFO SparkEnv: Registering MapOutputTracker&lt;BR /&gt;15/05/15 16:08:24 INFO SparkEnv: Registering BlockManagerMaster&lt;BR /&gt;15/05/15 16:08:24 INFO DiskBlockManager: Created local directory at /tmp/spark-local-20150515160824-7963&lt;BR /&gt;15/05/15 16:08:24 INFO MemoryStore: MemoryStore started with capacity 265.4 MB&lt;BR /&gt;15/05/15 16:08:24 INFO HttpFileServer: HTTP File server directory is /tmp/spark-d0ea3c3a-db92-43de-bc3d-6e6a6fd415f2&lt;BR /&gt;15/05/15 16:08:24 INFO HttpServer: Starting HTTP Server&lt;BR /&gt;15/05/15 16:08:24 INFO Utils: Successfully started service 'HTTP file server' on port 33870.&lt;BR /&gt;15/05/15 16:08:25 INFO Utils: Successfully started service 'SparkUI' on port 4040.&lt;BR /&gt;15/05/15 16:08:25 INFO SparkUI: Started SparkUI at &lt;A href="http://hdp-16:4040" target="_blank"&gt;http://hdp-16:4040&lt;/A&gt;&lt;BR /&gt;15/05/15 16:08:25 INFO Executor: Using REPL class URI: &lt;A target="_blank" href="http://192.168.91.142:39187"&gt;http://192.168.91.142:39187&lt;/A&gt;&lt;BR /&gt;15/05/15 16:08:25 INFO AkkaUtils: Connecting to HeartbeatReceiver: akka.tcp://sparkDriver@hdp-16:51885/user/HeartbeatReceiver&lt;BR /&gt;15/05/15 16:08:25 INFO NettyBlockTransferService: Server created on 40784&lt;BR /&gt;15/05/15 16:08:25 INFO BlockManagerMaster: Trying to register BlockManager&lt;BR /&gt;15/05/15 16:08:25 INFO BlockManagerMasterActor: Registering block manager localhost:40784 with 265.4 MB RAM, BlockManagerId(&amp;lt;driver&amp;gt;, localhost, 40784)&lt;BR /&gt;15/05/15 16:08:25 INFO BlockManagerMaster: Registered BlockManager&lt;BR /&gt;15/05/15 16:08:26 INFO EventLoggingListener: Logging events to hdfs://hdp-7:8020/user/spark/applicationHistory/local-1431691705159&lt;BR /&gt;15/05/15 16:08:26 INFO SparkILoop: Created spark context..&lt;BR /&gt;Spark context available as sc.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scala&amp;gt; import org.apache.spark.SparkFiles;&lt;/STRONG&gt;&lt;BR /&gt;import org.apache.spark.SparkFiles&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scala&amp;gt; val inFile = sc.textFile(SparkFiles.get("test.data"));&lt;/STRONG&gt;&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: ensureFreeSpace(258986) called with curMem=0, maxMem=278302556&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: Block broadcast_0 stored as values in memory (estimated size 252.9 KB, free 265.2 MB)&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: ensureFreeSpace(21113) called with curMem=258986, maxMem=278302556&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: Block broadcast_0_piece0 stored as bytes in memory (estimated size 20.6 KB, free 265.1 MB)&lt;BR /&gt;15/05/15 16:08:33 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on localhost:40784 (size: 20.6 KB, free: 265.4 MB)&lt;BR /&gt;15/05/15 16:08:33 INFO BlockManagerMaster: Updated info of block broadcast_0_piece0&lt;BR /&gt;15/05/15 16:08:33 INFO SparkContext: Created broadcast 0 from textFile at &amp;lt;console&amp;gt;:13&lt;BR /&gt;inFile: org.apache.spark.rdd.RDD[String] = /tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data MappedRDD[1] at textFile at &amp;lt;console&amp;gt;:13&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scala&amp;gt; inFile.first();&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://hdp-7:8020/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data&lt;/FONT&gt;&lt;BR /&gt;at org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:285)&lt;BR /&gt;at org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:228)&lt;BR /&gt;at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:313)&lt;BR /&gt;at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:201)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:205)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:203)&lt;BR /&gt;at scala.Option.getOrElse(Option.scala:120)&lt;BR /&gt;at org.apache.spark.rdd.RDD.partitions(RDD.scala:203)&lt;BR /&gt;at org.apache.spark.rdd.MappedRDD.getPartitions(MappedRDD.scala:28)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:205)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:203)&lt;BR /&gt;at scala.Option.getOrElse(Option.scala:120)&lt;BR /&gt;at org.apache.spark.rdd.RDD.partitions(RDD.scala:203)&lt;BR /&gt;at org.apache.spark.rdd.RDD.take(RDD.scala:1060)&lt;BR /&gt;at org.apache.spark.rdd.RDD.first(RDD.scala:1093)&lt;BR /&gt;at $iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:16)&lt;BR /&gt;at $iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:21)&lt;BR /&gt;at $iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:23)&lt;BR /&gt;at $iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:25)&lt;BR /&gt;at &amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:27)&lt;BR /&gt;at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:31)&lt;BR /&gt;at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)&lt;BR /&gt;at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:7)&lt;BR /&gt;at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)&lt;BR /&gt;at $print(&amp;lt;console&amp;gt;)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:852)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1125)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:674)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:705)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:669)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:828)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:873)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:785)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.processLine$1(SparkILoop.scala:628)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.innerLoop$1(SparkILoop.scala:636)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.loop(SparkILoop.scala:641)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply$mcZ$sp(SparkILoop.scala:968)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:916)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:916)&lt;BR /&gt;at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:916)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1011)&lt;BR /&gt;at org.apache.spark.repl.Main$.main(Main.scala:31)&lt;BR /&gt;at org.apache.spark.repl.Main.main(Main.scala)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt;at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:358)&lt;BR /&gt;at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:75)&lt;BR /&gt;at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:29:03 GMT</pubDate>
    <dc:creator>apilipenko</dc:creator>
    <dc:date>2022-09-16T09:29:03Z</dc:date>
    <item>
      <title>spark-shell directories lookup failure</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-shell-directories-lookup-failure/m-p/27507#M5924</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm newbie in spark. Please help me. I try to run simple script in spark-shell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import org.apache.spark.SparkFiles;
val inFile = sc.textFile(SparkFiles.get("test.data"));
inFile.first();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but on inFile.first() i got exception&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://hdp-7:8020/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is no such directory in HDFS, but i have directory on local fs :&amp;nbsp;/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04 with 0 files inside.&lt;/P&gt;&lt;P&gt;I suppose the troubles in spark-shell startup - i got line in start log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;15/05/15 16:08:24 INFO HttpFileServer: HTTP File server directory is /tmp/spark-d0ea3c3a-db92-43de-bc3d-6e6a6fd415f2&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems work directory created locally, but when i try get access to RDD it try get it from HDFS:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://hdp-7:8020/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cloudera Express 5.3.2, spark was installed as yarn application in Cloudera Manager console.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;full log underline:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[root@hdp-16 ~]# spark-shell&lt;BR /&gt;15/05/15 16:08:19 INFO SecurityManager: Changing view acls to: root&lt;BR /&gt;15/05/15 16:08:19 INFO SecurityManager: Changing modify acls to: root&lt;BR /&gt;15/05/15 16:08:19 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)&lt;BR /&gt;15/05/15 16:08:19 INFO HttpServer: Starting HTTP Server&lt;BR /&gt;15/05/15 16:08:19 INFO Utils: Successfully started service 'HTTP class server' on port 39187.&lt;BR /&gt;Welcome to&lt;BR /&gt;____ __&lt;BR /&gt;/ __/__ ___ _____/ /__&lt;BR /&gt;_\ \/ _ \/ _ `/ __/ '_/&lt;BR /&gt;/___/ .__/\_,_/_/ /_/\_\ version 1.2.0-SNAPSHOT&lt;BR /&gt;/_/&lt;/P&gt;&lt;P&gt;Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_67)&lt;BR /&gt;Type in expressions to have them evaluated.&lt;BR /&gt;Type :help for more information.&lt;BR /&gt;15/05/15 16:08:24 INFO SecurityManager: Changing view acls to: root&lt;BR /&gt;15/05/15 16:08:24 INFO SecurityManager: Changing modify acls to: root&lt;BR /&gt;15/05/15 16:08:24 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(root); users with modify permissions: Set(root)&lt;BR /&gt;15/05/15 16:08:24 INFO Slf4jLogger: Slf4jLogger started&lt;BR /&gt;15/05/15 16:08:24 INFO Remoting: Starting remoting&lt;BR /&gt;15/05/15 16:08:24 INFO Remoting: Remoting started; listening on addresses :[akka.tcp://sparkDriver@hdp-16:51885]&lt;BR /&gt;15/05/15 16:08:24 INFO Remoting: Remoting now listens on addresses: [akka.tcp://sparkDriver@hdp-16:51885]&lt;BR /&gt;15/05/15 16:08:24 INFO Utils: Successfully started service 'sparkDriver' on port 51885.&lt;BR /&gt;15/05/15 16:08:24 INFO SparkEnv: Registering MapOutputTracker&lt;BR /&gt;15/05/15 16:08:24 INFO SparkEnv: Registering BlockManagerMaster&lt;BR /&gt;15/05/15 16:08:24 INFO DiskBlockManager: Created local directory at /tmp/spark-local-20150515160824-7963&lt;BR /&gt;15/05/15 16:08:24 INFO MemoryStore: MemoryStore started with capacity 265.4 MB&lt;BR /&gt;15/05/15 16:08:24 INFO HttpFileServer: HTTP File server directory is /tmp/spark-d0ea3c3a-db92-43de-bc3d-6e6a6fd415f2&lt;BR /&gt;15/05/15 16:08:24 INFO HttpServer: Starting HTTP Server&lt;BR /&gt;15/05/15 16:08:24 INFO Utils: Successfully started service 'HTTP file server' on port 33870.&lt;BR /&gt;15/05/15 16:08:25 INFO Utils: Successfully started service 'SparkUI' on port 4040.&lt;BR /&gt;15/05/15 16:08:25 INFO SparkUI: Started SparkUI at &lt;A href="http://hdp-16:4040" target="_blank"&gt;http://hdp-16:4040&lt;/A&gt;&lt;BR /&gt;15/05/15 16:08:25 INFO Executor: Using REPL class URI: &lt;A target="_blank" href="http://192.168.91.142:39187"&gt;http://192.168.91.142:39187&lt;/A&gt;&lt;BR /&gt;15/05/15 16:08:25 INFO AkkaUtils: Connecting to HeartbeatReceiver: akka.tcp://sparkDriver@hdp-16:51885/user/HeartbeatReceiver&lt;BR /&gt;15/05/15 16:08:25 INFO NettyBlockTransferService: Server created on 40784&lt;BR /&gt;15/05/15 16:08:25 INFO BlockManagerMaster: Trying to register BlockManager&lt;BR /&gt;15/05/15 16:08:25 INFO BlockManagerMasterActor: Registering block manager localhost:40784 with 265.4 MB RAM, BlockManagerId(&amp;lt;driver&amp;gt;, localhost, 40784)&lt;BR /&gt;15/05/15 16:08:25 INFO BlockManagerMaster: Registered BlockManager&lt;BR /&gt;15/05/15 16:08:26 INFO EventLoggingListener: Logging events to hdfs://hdp-7:8020/user/spark/applicationHistory/local-1431691705159&lt;BR /&gt;15/05/15 16:08:26 INFO SparkILoop: Created spark context..&lt;BR /&gt;Spark context available as sc.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scala&amp;gt; import org.apache.spark.SparkFiles;&lt;/STRONG&gt;&lt;BR /&gt;import org.apache.spark.SparkFiles&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scala&amp;gt; val inFile = sc.textFile(SparkFiles.get("test.data"));&lt;/STRONG&gt;&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: ensureFreeSpace(258986) called with curMem=0, maxMem=278302556&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: Block broadcast_0 stored as values in memory (estimated size 252.9 KB, free 265.2 MB)&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: ensureFreeSpace(21113) called with curMem=258986, maxMem=278302556&lt;BR /&gt;15/05/15 16:08:33 INFO MemoryStore: Block broadcast_0_piece0 stored as bytes in memory (estimated size 20.6 KB, free 265.1 MB)&lt;BR /&gt;15/05/15 16:08:33 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on localhost:40784 (size: 20.6 KB, free: 265.4 MB)&lt;BR /&gt;15/05/15 16:08:33 INFO BlockManagerMaster: Updated info of block broadcast_0_piece0&lt;BR /&gt;15/05/15 16:08:33 INFO SparkContext: Created broadcast 0 from textFile at &amp;lt;console&amp;gt;:13&lt;BR /&gt;inFile: org.apache.spark.rdd.RDD[String] = /tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data MappedRDD[1] at textFile at &amp;lt;console&amp;gt;:13&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;scala&amp;gt; inFile.first();&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://hdp-7:8020/tmp/spark-60b9bde7-d198-4a90-8f90-02e9cf77fa04/test.data&lt;/FONT&gt;&lt;BR /&gt;at org.apache.hadoop.mapred.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:285)&lt;BR /&gt;at org.apache.hadoop.mapred.FileInputFormat.listStatus(FileInputFormat.java:228)&lt;BR /&gt;at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:313)&lt;BR /&gt;at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:201)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:205)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:203)&lt;BR /&gt;at scala.Option.getOrElse(Option.scala:120)&lt;BR /&gt;at org.apache.spark.rdd.RDD.partitions(RDD.scala:203)&lt;BR /&gt;at org.apache.spark.rdd.MappedRDD.getPartitions(MappedRDD.scala:28)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:205)&lt;BR /&gt;at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:203)&lt;BR /&gt;at scala.Option.getOrElse(Option.scala:120)&lt;BR /&gt;at org.apache.spark.rdd.RDD.partitions(RDD.scala:203)&lt;BR /&gt;at org.apache.spark.rdd.RDD.take(RDD.scala:1060)&lt;BR /&gt;at org.apache.spark.rdd.RDD.first(RDD.scala:1093)&lt;BR /&gt;at $iwC$$iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:16)&lt;BR /&gt;at $iwC$$iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:21)&lt;BR /&gt;at $iwC$$iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:23)&lt;BR /&gt;at $iwC.&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:25)&lt;BR /&gt;at &amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:27)&lt;BR /&gt;at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:31)&lt;BR /&gt;at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)&lt;BR /&gt;at .&amp;lt;init&amp;gt;(&amp;lt;console&amp;gt;:7)&lt;BR /&gt;at .&amp;lt;clinit&amp;gt;(&amp;lt;console&amp;gt;)&lt;BR /&gt;at $print(&amp;lt;console&amp;gt;)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:852)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1125)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:674)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:705)&lt;BR /&gt;at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:669)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:828)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:873)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:785)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.processLine$1(SparkILoop.scala:628)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.innerLoop$1(SparkILoop.scala:636)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.loop(SparkILoop.scala:641)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply$mcZ$sp(SparkILoop.scala:968)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:916)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:916)&lt;BR /&gt;at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:916)&lt;BR /&gt;at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1011)&lt;BR /&gt;at org.apache.spark.repl.Main$.main(Main.scala:31)&lt;BR /&gt;at org.apache.spark.repl.Main.main(Main.scala)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;BR /&gt;at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:358)&lt;BR /&gt;at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:75)&lt;BR /&gt;at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any ideas?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:29:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-shell-directories-lookup-failure/m-p/27507#M5924</guid>
      <dc:creator>apilipenko</dc:creator>
      <dc:date>2022-09-16T09:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: spark-shell directories lookup failure</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-shell-directories-lookup-failure/m-p/27914#M5925</link>
      <description>&lt;P&gt;Why are you using SparkFiles? The path that you try to open is not defined because SparkFiles expects paths to files added through SparkContext.addFile(). Unless you have done that you should be using sc.textFile() and pass in the URI for the file (hdfs://... or something like it)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wilfred&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2015 01:45:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-shell-directories-lookup-failure/m-p/27914#M5925</guid>
      <dc:creator>Wilfred</dc:creator>
      <dc:date>2015-05-26T01:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: spark-shell directories lookup failure</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-shell-directories-lookup-failure/m-p/27978#M5926</link>
      <description>&lt;P&gt;Thank you for response! It solves my troubles.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2015 13:15:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-shell-directories-lookup-failure/m-p/27978#M5926</guid>
      <dc:creator>apilipenko</dc:creator>
      <dc:date>2015-05-27T13:15:10Z</dc:date>
    </item>
  </channel>
</rss>

