Introduction to some common commands in hadoop. Assume that the Hadoop installation directory HADOOP_HOME is homeadminhadoop. Start and close Hadoop1. open the HADOOP_HOME directory. 2. run the shbinstart-all.sh to close Hadoop1. go to HADOOP_HOM. suppose Hadoop's installation directory HADOOP_HOME is/home/admin/hadoop
Assume that the installation directory for Hadoop is Hadoop_home/home/admin/hadoop.
Start and closeStart Hadoop1. Enter the Hadoop_home directory.
2. Execute SH bin/start-all.sh
Turn off Hadoop1. Enter the Hadoop_home directory.2. Execute SH bin/stop-all.shFile operationsHadoop uses HDFs, which is similar in functionality to the disk systems we use. and wildcard characters such as * are supported.
View a
This article provides a detailed analysis of some commonly used commands in hadoop. For more information, see Hadoop installation directory HADOOP_HOME:/home/admin/hadoop.
Start and closeStart Hadoop1. go to the HADOOP_HOME directory.
2. execute sh bin/start-all.sh
Disable Hadoop1. go to the HADOOP_HOME directory.2.
/hadoop jar/home/admin/hadoop/job. jar [jobMainClass] [jobArgs]
Killing a running JobAssume that Job_Id is job_20100531_37_0053.1. Go to the HADOOP_HOME directory.2. Execute sh bin/hadoop job-kill job_20100531_37_0053
More Hadoop commandsThe Hadoop operation
After installing the Hadoop pseudo-distributed environment, executing the relevant commands (for example: Bin/hdfs dfs-ls) will appearWARN util. nativecodeloader:unable to load Native-hadoop library for your platform ... using Builtin-java classes where applicable, which is Because the installed Navtive packages and platforms do not match, the
Assume that the Hadoop installation directory HADOOP_HOME is/home/admin/hadoop.Start and closeStart Hadoop1. Go to the HADOOP_HOME directory.2. Execute sh bin/start-all.sh
Disable Hadoop1. Go to the HADOOP_HOME directory.2. Execute sh bin/stop-all.shFile OperationsHadoop uses HDFS to implement functions similar to the disk system we use. Wildcard characters are also supported, such *.
View the file listView the files in the/user/admin/aaron directory
directory.2. Perform sh bin/hadoop jar/home/admin/hadoop/job.jar [jobmainclass] [Jobargs]
Kill a running jobSuppose job_id is: job_201005310937_00531. Enter the Hadoop_home directory.2. Perform sh bin/hadoop job-kill job_201005310937_0053
More Hadoop commandsThe operation comman
To make it easier for you to review your memory, we will summarize the hadoop commands of today's experiment for later viewing.Note: The following commands are performed in hadoop/bin.1. hadoop FS-ls \-> View All the following dir
/ci_cuser_20141231141853691/* ' >ci_cusere_20141231141853691.csv echo $?~/.bash_profile: Each user can use this file to enter shell information dedicated to their own use, when the user logs on, theThe file is only executed once! By default, he sets some environment variables to execute the user's. bashrc file.Hadoop fs-cat ' $1$2/* ' >$3.csvMV $3.csv/home/ocdc/cocString command = "CD" + Ciftpinfo.getftppath () + "" +hadooppath+ "
From:http://www.2cto.com/database/201303/198460.htmlHadoop HDFs Common CommandsHadoop common commands:Hadoop FSView all commands supported by Hadoop HDFsHadoop fs–lslisting directory and file informationHadoop FS–LSRLoop lists directories, subdirectories, and file informationHadoop
I sorted it out by referring to a person's blog on the Internet:
Start HadoopGo to the HADOOP_HOME directory. Run bin/start-all.sh close Hadoop go to HADOOP_HOME directory execute bin/stop-all.sh
1. view the content in the specified directory
Hadoop dfs-ls [file directory]
Eg: hadoop dfs-ls/user/wangkai.pt
2. Open an existing file
start HadoopEnter the Hadoop_home directory. Execute SH bin/start-all.sh
Turn off HadoopEnter the Hadoop_home directory. Execute SH bin/stop-all.sh
1. View content in the specified directory
Hadoop dfs–ls [File directory]
Eg:hadoop dfs–ls/user/wangkai.pt
2. Open an existing file
Hadoop Dfs–cat [File_path]
Eg:hadoop Dfs-cat/user/wangkai.pt/data.txt
3. Store local files to
commands in the Hadoop process:1. View the process
Linux under View process: $ PS Linux View Java process: $ jps
2. View Hadoop-related commands
$ hadoop (using such as: $ Hadoop namenode–format)
3. Vi
Preface: Well, it's just a little bit more comfortable without writing code, but we can't slack off. The hive operation's file needs to be loaded from hereSimilar to the Linux commands, the command line begins with the Hadoop FS -(dash) LS / list file or directory cat Hadoop
Hadoop Namenode-format formatted Distributed File systemstart-all.sh Start all Hadoop daemonsstop-all.sh Stop all Hadoop daemonsstart-mapred.sh Start the Map/reduce daemonstop-mapred.sh Stop Map/reduce DaemonStart-dfs.sh starting the HDFs daemonstop-mapred.sh Stop HDFs Daemonstart-balancer.sh HDFS data Block load BalancingFS in the following command can also be w
Add a Hadoop group
sudo addgroup Hadoop
Add the current user Larry to the Hadoop groupsudo usermod-a-G Hadoop Larry
Add Hadoop Group to Sudoersudo gedit etc/sudoersHadoop all= (All) after Root all= (all)
Modify the permissions for the H
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.