dgadiraju
1/19/2017 - 1:46 AM

Hadoop command to get started by copying files in local file system. Run this on shell

Hadoop command to get started by copying files in local file system. Run this on shell

-- Create directory cards under home
mkdir cards
-- Copy largedeck.txt file to the gateway node and place it in cards directory under home directory
-- On lab file is placed under /data directory where any one can read
cp /data/cards/* ~/cards

-- If you want to copy other files you have to use scp/winscp from your PC to gateway

-- Confirm largedeck.txt is available under your home directory
ls -ltr ~/cards

-- Copy directory from your local file system to HDFS
hadoop fs -copyFromLocal ~/cards /user/training/cards

-- Validate the directory cards and files are available
hadoop fs -ls -R /user/training/cards