0% found this document useful (0 votes)
14 views1 page

HDFS Commands

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

HDFS Commands

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

# load Hadoop module

--------------------

module load Hadoop/2.6.0-cdh5.8.0-native

# create a new directory called "input" on HDFS


hdfs dfs -mkdir input

# copy local file wiki_sample to input on HDFS


hdfs dfs -put wiki_1k_lines input/

# list contents of directory ("-h" = human)


hdfs dfs -ls -h input

# disk usage
hdfs dfs -du -h input

# get help on "du" command


hdfs dfs -help du

# remove directory
hdfs dfs -rm -r input

# usage
hdfs dfs -usage

# get help on the HDFS "tail" command


hdfs dfs -help tail

# show the size of wiki_1k_lines on the regular filesystem


ls -lh wiki_1k_lines

# show the size of wiki_1k_lines on HDFS


hdfs dfs -put wiki_1k_lines
hdfs dfs -ls -h wiki_1k_lines

# disk usage of wiki_1k_lines on the regular filesystem


du -h wiki_1k_lines

# disk usage of wiki_1k_lines on HDFS


hdfs dfs -du -h wiki_1k_lines

# check blocksize and replication


hdfs dfs -stat 'Block size: %o No. of blocks: %b Replication:%r'
input/wiki_1k_lines

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy