<?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 Re: Unable to see the file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171154#M54123</link>
    <description>&lt;P&gt;@Artem Ervits Thanks for the response. I tried same but no luck.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 12 Feb 2017 07:16:49 GMT</pubDate>
    <dc:creator>ram_ghase</dc:creator>
    <dc:date>2017-02-12T07:16:49Z</dc:date>
    <item>
      <title>Unable to see the file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171151#M54120</link>
      <description>&lt;P&gt;I am practicing steps from tutorial "A Lap Around Apache Spark"
One of the step is 
"
Perform WordCount with Spark
Copy input file for Spark WordCount Example
Upload the input file you want to use in WordCount to HDFS. You can use any text file as input. In the following example, log4j.properties is used as an example:
As user spark:
hadoop fs -copyFromLocal /etc/hadoop/conf/log4j.properties /tmp/data
"&lt;/P&gt;&lt;P&gt;After this step I am not able to see the log4j.properties file into /tmp/data path but if I try to execute copyFromLocal above command it says File exist.&lt;/P&gt;&lt;P&gt;I am using below command to view file.&lt;/P&gt;&lt;P&gt;hdfs dfs -ls /tmp/data&lt;/P&gt;&lt;P&gt;also tried&lt;/P&gt;&lt;P&gt;hdfs dfs -cat /tmp/data/log4j.properties&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 04:10:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171151#M54120</guid>
      <dc:creator>ram_ghase</dc:creator>
      <dc:date>2017-02-12T04:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171152#M54121</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15961/ramghase.html" nodeid="15961"&gt;@Ram Ghase&lt;/A&gt; what if you run the command as this?&lt;/P&gt;&lt;PRE&gt;sudo -u spark hdfs dfs -ls /tmp/data/&lt;/PRE&gt;&lt;P&gt;also make sure /tmp/data exists&lt;/P&gt;&lt;PRE&gt;hdfs dfs -ls /tmp/&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Feb 2017 04:35:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171152#M54121</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-02-12T04:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171153#M54122</link>
      <description>&lt;PRE&gt;please see the set of commands I am trying to executing. 

[root@sandbox tmp]# pwd
/tmp
[root@sandbox tmp]# ls -ltr | grep word
-rw-r--r--  1 root       root           2 Oct 25 08:13 words.txt
-rw-r--r--  1 root       root         128 Feb 11 19:39 wordFile.txt
[root@sandbox tmp]# hdfs dfs -ls /tmp/data/
-rwxrwxrwx   1 root hdfs      10411 2017-02-10 03:55 /tmp/data
[root@sandbox tmp]# su spark
[spark@sandbox tmp]$ hdfs dfs -put wordFile.txt /tmp/data/
put: `/tmp/data': File exists
[spark@sandbox tmp]$ hdfs dfs -copyFromLocal wordFile.txt /tmp/data/
copyFromLocal: `/tmp/data': File exists
[spark@sandbox tmp]$ sudo -u spark hdfs dfs -ls /tmp/data/
spark is not in the sudoers file.  This incident will be reported.
[spark@sandbox tmp]$ exit
exit
[root@sandbox tmp]# sudo -u spark hdfs dfs -ls /tmp/data/
-rwxrwxrwx   1 root hdfs      10411 2017-02-10 03:55 /tmp/data
[root@sandbox tmp]# su -u spark hdfs dfs -ls /tmp/data/
su: invalid option -- 'u'
&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Feb 2017 07:05:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171153#M54122</guid>
      <dc:creator>ram_ghase</dc:creator>
      <dc:date>2017-02-12T07:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171154#M54123</link>
      <description>&lt;P&gt;@Artem Ervits Thanks for the response. I tried same but no luck.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 07:16:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171154#M54123</guid>
      <dc:creator>ram_ghase</dc:creator>
      <dc:date>2017-02-12T07:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171155#M54124</link>
      <description>&lt;P&gt;Your /tmp/data on hdfs is a file, not a directory. So, when you did the copy for the first time&lt;/P&gt;&lt;PRE&gt;tmp]$ hdfs dfs -copyFromLocal wordFile.txt /tmp/data/&lt;/PRE&gt;&lt;P&gt;wordFile.txt was copied to /tmp and renamed to "data". That's why the second time the command complains that the file exists, because by default "-put" or "-copyFromLocal" don't owerwrite target files. You can force overwrite by adding "-f":&lt;/P&gt;&lt;PRE&gt;tmp]$ hdfs dfs -copyFromLocal -f wordFile.txt /tmp/data/&lt;/PRE&gt;&lt;P&gt;If you copy to a directory, than the original file name will be preserved:&lt;/P&gt;&lt;PRE&gt;tmp]$ hdfs dfs -copyFromLocal wordFile.txt /tmp
&lt;/PRE&gt;&lt;P&gt;will create /tmp/wordFile.txt on hdfs.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 07:25:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171155#M54124</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2017-02-12T07:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to see the file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171156#M54125</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/177/pminovic.html" nodeid="177"&gt;@Predrag Minovic&lt;/A&gt;  Thank you sir. It worked.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 08:25:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-see-the-file/m-p/171156#M54125</guid>
      <dc:creator>ram_ghase</dc:creator>
      <dc:date>2017-02-12T08:25:54Z</dc:date>
    </item>
  </channel>
</rss>

