HDFS Copy From Local

Share

                    HDFS Copy From Local

In Hadoop, you can use the hadoop fs -copyFromLocal command to copy files and directories from your local file system to the Hadoop Distributed File System (HDFS). This command is useful when you want to transfer data from your local machine to the Hadoop cluster for processing. Here’s how you can use it:

The basic syntax of the hadoop fs -copyFromLocal command is as follows:

bash
hadoop fs -copyFromLocal <local-source> <hdfs-destination>
  • <local-source>: This is the path to the file or directory on your local machine that you want to copy to HDFS.
  • <hdfs-destination>: This is the destination path in HDFS where you want to place the copied file or directory.

Here’s a step-by-step guide on how to use the hadoop fs -copyFromLocal command:

  1. Open a terminal or command prompt on your local machine.

  2. Use the hadoop fs -copyFromLocal command to copy a file or directory to HDFS. Replace <local-source> and <hdfs-destination> with your actual file or directory paths.

    bash
    hadoop fs -copyFromLocal /path/to/local/file_or_directory /user/username/hdfs_destination
    • /path/to/local/file_or_directory: Specify the path to the file or directory on your local machine that you want to copy to HDFS.
    • /user/username/hdfs_destination: Specify the destination path in HDFS where you want to place the copied data. You can replace /user/username/ with your HDFS home directory or another HDFS directory where you have write permissions.
  3. Press Enter to execute the command. Hadoop will copy the specified file or directory from your local machine to the specified location in HDFS.

  4. You can use the hadoop fs -ls command to verify that the file or directory has been successfully copied to HDFS:

    bash
    hadoop fs -ls <hdfs-destination>

Hadoop Training Demo Day 1 Video:

 
You can find more information about Hadoop Training in this Hadoop Docs Link

 

Conclusion:

Unogeeks is the No.1 IT Training Institute for Hadoop Training. Anyone Disagree? Please drop in a comment

You can check out our other latest blogs on Hadoop Training here – Hadoop Blogs

Please check out our Best In Class Hadoop Training Details here – Hadoop Training

💬 Follow & Connect with us:

———————————-

For Training inquiries:

Call/Whatsapp: +91 73960 33555

Mail us at: info@unogeeks.com

Our Website ➜ https://unogeeks.com

Follow us:

Instagram: https://www.instagram.com/unogeeks

Facebook:https://www.facebook.com/UnogeeksSoftwareTrainingInstitute

Twitter: https://twitter.com/unogeeks

                Hadoop SQL Server

 


Share

Leave a Reply

Your email address will not be published. Required fields are marked *