270933515-Hadoop-Shell-Commands.docx

Please download to get full document.

View again

of 63
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Documents

Published:

Views: 9 | Pages: 63

Extension: DOCX | Download: 0

Share
Related documents
Description
Hadoop Shell Commands Posted on November 26, 2013 by aravindu012 1 Comment Leave a comment This post will help users to learn important and useful Hadoop shell commands which are very close to Unix shell commands., using these commands user can perform different operations on hdfs. People who are familiar with Unix shell commands can easily get hold of it, people who are new to Unix or hadoop need not to worry, just follow this article to learn all the commands used in day to day basis and prac
Transcript
  Hadoop Shell Commands Posted on November 26, 2013 by aravindu012 1 Comment Leave a comment  This post will help users to learn important and useul !adoop shell commands which are very close to ni# shell commands$, usin% these commands user can perorm dierent operations on hds$ People who are amiliar with ni# shell commands can easily %et hold o it, people who are new to ni# or hadoop need not to worry, &ust ollow this article to learn all the commands used in day to day basis and practice the same$ FS Shell The 'ile(ystem )'(* shell is invo+ed by binhadoop s -ar%s.$ /ll the '( shell commands ta+e path s as ar%uments$ The  ormat is  scheme://autority/path $ 'or !'( the schemeis hdfs , and or the local ilesystem the scheme is  file $ The scheme and authority are optional$  not speciied, the deault scheme speciied in the coni%uration is used$ /n !'( ile or directory such as  /parent/child   can be speciied as hdfs://namenodehost/parent/child   or simplyas  /parent/child. Administrator Commands: fsck – / un a !'( ilesystem chec+in% tility Example: hadoop fsck - /  balancer uns a cluster balancin% utility$ /n administrator can simply press CtrlC to stop the re balancin% process$ Example: hadoop balancer version Prints the hadoop version coni%ured on the machine Example: hadoop version  Hadoop fs commands: ls 'or a ile returns stat on the ile with the ollowin% ormat4ilename -number o replicas. ilesi5e modiicationdate modiicationtime permissions userid%roupid 'or a directory it returns list o its direct children as in ni#$ / directory is listedas4 dirname -dir. modiicationtime modiicationtime permissions userid %roupid sa%e4 hadoop s ls -ar%s. Example: hadoop fs -ls lsr ecursive version o ls$ (imilar to ni# ls $ sa%e4 hadoop s lsr -ar%s. Example hadoop fs -lsr  mkdir Ta+es path uris as an ar%ument and creates directories$ The behavior is much li+e uni# m+dir p creatin% parent directories alon% the path$ sa%e4 hadoop s m+dir -paths. Example: hadoop fs -mkdir /user/hadoop/Aravindu mv 7oves iles rom source to destination$ This command allows multiple sources as well in which case the destination needs to be a directory$ 7ovin% iles across ile systems is not permitted$ sa%e4 hadoop s mv  8  9: -dest. Example: hadoop fs -mv /user/hduser/Aravindu/Consolidated_Sheet.csv /user/hduser/sandela/ put Copy sin%le src, or multiple srcs rom local ile system to the destination ilesystem$ /lso reads input rom stdin and writes to destination ilesystem$ sa%e4 hadoop s put -localsrc. 9 -dst.
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks