Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Last active January 19, 2017 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgadiraju/c8ee83218b5238cfa23a402acf62af57 to your computer and use it in GitHub Desktop.
Save dgadiraju/c8ee83218b5238cfa23a402acf62af57 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment