<?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: how to copy file from mount point to hdfs (WebShellClient) in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237968#M199779</link>
    <description>&lt;P&gt;i figured the issues was not with target directory , it was source DIR where permissions were lacking, hence I fixed using below commands (Please note 777 is not a good practice , you will need adjust per your production scenario)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ hdfs dfs -chmod 777 /user/hadoop                                                                                                                                                                                                                                   &lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ hdfs dfs -chmod 777 /user/hadoop/silverPop&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2019 00:02:30 GMT</pubDate>
    <dc:creator>bhaskerbobby</dc:creator>
    <dc:date>2019-04-11T00:02:30Z</dc:date>
    <item>
      <title>how to copy file from mount point to hdfs (WebShellClient)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237965#M199776</link>
      <description>&lt;P&gt;Hi everyone , &lt;/P&gt;&lt;P&gt;This is the Sandbox env.,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;M trying to load data into Hive table called: dwstg.dummy; here are the steps i followed inside WebShellClient&lt;/P&gt;&lt;P&gt;Step1)after connecting to JDBC Hive , below is the command i issued&lt;/P&gt;&lt;P&gt;Input)&lt;/P&gt;&lt;P&gt; LOAD DATA INPATH '/mnt/tmp/testme.csv' OVERWRITE INTO TABLE dwstg.dummy;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Output) I get following error&lt;/P&gt;&lt;P&gt;Error: Error while compiling statement: FAILED: SemanticException Line 1:17 Invalid path ''/mnt/tmp/testme.csv'': &lt;/P&gt;&lt;P&gt;No files matching path hdfs://sandbox-hdp.hortonworks.com:8020/mnt/tmp/testme.csv (state=42000,code=40000) &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Step2)based on the above error , i researched &amp;amp; realized JDBC is not seeing the mount point as it should exist only in HDFS directory for it to see?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Step2.1)So i ran below command --&amp;gt;&lt;/P&gt;&lt;P&gt;Input)  hadoop fs -cp /mnt/tmp/testme.csv hdfs:/    &lt;/P&gt;&lt;P&gt;Output:   cp: `/mnt/tmp/testme.csv': No such file or directory                                                                                                                                                                                        &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So what m trying to figure out is , how to copy file from Mount point to hdfs directory structure?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards:&lt;/P&gt;&lt;P&gt;Bhasker.V&lt;/P&gt;&lt;P&gt;Jsglp&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 08:04:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237965#M199776</guid>
      <dc:creator>bhaskerbobby</dc:creator>
      <dc:date>2019-04-09T08:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to copy file from mount point to hdfs (WebShellClient)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237966#M199777</link>
      <description>&lt;P&gt;you should do  1)hdfs dfs -put ${dir_home}/testme.csv /mnt/tmp/    2)LOAD DATA INPATH '/mnt/tmp/testme.csv' OVERWRITE INTO TABLE dwstg.dummy; &lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2019 21:44:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237966#M199777</guid>
      <dc:creator>13526464656</dc:creator>
      <dc:date>2019-04-09T21:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to copy file from mount point to hdfs (WebShellClient)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237967#M199778</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/113015/13526464656.html"&gt;@shuaili gong&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply, I went through below steps and finally managed upload the file in the HDFS directory so Hive can access it and this was sucessful.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Now m having permission issues from source directory to /warehouse directory. I manually changed to 777 on /warehouse so everybody have full access and yet m still getting same permission issue. i have also checked via Ambari on this /warehouse directory and i can see it has full access to everyone but still same issue. Any suggestions highly appreciated&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Below are the steps i followed on how i uploaded file etc and gave permissions as well.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# cp /mnt/tmp/testme.csv testme.csv&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# ls -ltr&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# su hdfs&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp root]$ cd&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ hdfs dfs -chmod 777 /user&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ exit&lt;/P&gt;&lt;P&gt;exit&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]#&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# su hdfs&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp root]$ cd&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ ls -ltr&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ exit&lt;/P&gt;&lt;P&gt;exit&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# hdfs dfs -mkdir /user/hadoop/&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# hdfs dfs -mkdir /user/hadoop/silverPop&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# hdfs dfs -put testme.csv /user/hadoop/silverPop&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# hdfs dfs -ls /user/hadoop/silverPop&lt;/P&gt;&lt;P&gt;Found 1 items&lt;/P&gt;&lt;P&gt;-rw-r--r-- 1 root hdfs 12967 2019-04-08 20:41 /user/hadoop/silverPop/testme.csv&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# hdfs dfs -du /user/hadoop/silverPop/testme.csv&lt;/P&gt;&lt;P&gt;12967 12967 /user/hadoop/testme.csv&lt;/P&gt;&lt;P&gt;[root@sandbox-hdp ~]# hadoop fs -chmod g+w /warehouse&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://10.88.79.112:10000&amp;gt; LOAD DATA INPATH '/user/hadoop/silverPop/testme.csv' OVERWRITE INTO TABLE dwstg.dummy;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. org.apache.hadoop.hive.ql.metadata.HiveException: Access denied: Unable to move source hdfs://sandbox-hdp.hortonworks.com:8020/user/hadoop/silverPop/testme.csv to&lt;/P&gt;&lt;P&gt;destination hdfs://sandbox-hdp.hortonworks.com:8020/warehouse/tablespace/managed/hive/dwstg.db/temp_silverpop/base_0000012: Permission denied: user=hive, access=WRITE, inode="/user/hadoop/silverPop":root:hdfs:drwxr-xr-x&lt;/P&gt;&lt;P&gt;INFO : Completed executing command(queryId=hive_20190409152723_ee9c9ad2-9213-407d-8edc-16df7e13a2e0); Time taken: 0.112 seconds&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 00:02:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237967#M199778</guid>
      <dc:creator>bhaskerbobby</dc:creator>
      <dc:date>2019-04-11T00:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to copy file from mount point to hdfs (WebShellClient)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237968#M199779</link>
      <description>&lt;P&gt;i figured the issues was not with target directory , it was source DIR where permissions were lacking, hence I fixed using below commands (Please note 777 is not a good practice , you will need adjust per your production scenario)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ hdfs dfs -chmod 777 /user/hadoop                                                                                                                                                                                                                                   &lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ hdfs dfs -chmod 777 /user/hadoop/silverPop&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 00:02:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237968#M199779</guid>
      <dc:creator>bhaskerbobby</dc:creator>
      <dc:date>2019-04-11T00:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to copy file from mount point to hdfs (WebShellClient)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237969#M199780</link>
      <description>&lt;P&gt;I figured out the issue was not with target directory, it was with source directory where the files were coming from , hence i fixed the permissions on those directories and now all got succeeded&lt;/P&gt;&lt;P&gt;here is further commands i wrote to grand permissions (Please becarefull with 777 as it is not a good practice)&lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ hdfs dfs -chmod 777 /user/hadoop                                                                                                                                                                                                                                   &lt;/P&gt;&lt;P&gt;[hdfs@sandbox-hdp ~]$ hdfs dfs -chmod 777 /user/hadoop/silverPop   &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://10.88.79.112:10000&amp;gt; LOAD DATA INPATH '/user/hadoop/silverPop/testme.csv' OVERWRITE INTO TABLE dwstg.dummy;&lt;/P&gt;&lt;P&gt;successful&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 00:20:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-copy-file-from-mount-point-to-hdfs-WebShellClient/m-p/237969#M199780</guid>
      <dc:creator>bhaskerbobby</dc:creator>
      <dc:date>2019-04-11T00:20:44Z</dc:date>
    </item>
  </channel>
</rss>

