Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Hadoop command

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use the Hadoop command for you. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Usage:

Hadoop [--config confdir] [--loglevel loglevel] [COMMAND] [GENERIC_OPTIONS]

[COMMAND_OPTIONS]

Field description-config confdir overrides the default configuration directory. The default directory is ${HADOOP_HOME} / conf--loglevel loglevel override log level. Valid values: FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. The default is INFO. GENERIC_OPTIONS options collections that support multiple commands options collections of various commands of the COMMAND_ option SHadoop subproject

Generic Options

GENERIC_OPTIONS description-archivesSpecify comma separated archives to be unarchived on the compute machines. Applies only to job.-conf specifies an application's configuration file-D = copies to the MapReduce cluster a comma-delimited list of files using the specified attribute value-files. Applies only to tasks. -jt or specifies ResourceManager. Applies only to tasks. -libjars specifies that comma-delimited jar files are included in classpath. Apply to the task. 1 Hadoop public command

All of these commands are executed from hadoop shell command. They are divided into user commands and administrator commands.

1.1 user command

Commands used by Hadoop cluster users.

Archive

Create a hadoop archive.

Checknative

Usage: hadoop checknative [- a] [- h]

COMMAND_OPTION description-a detects whether all class libraries are available-h print help

This command detects the validity of Hadoop native code. By default, this command only detects the validity of libhadoop.

Classpath

Usage:

Usage: hadoop classpath [--glob |-- jar |-- h |-- help]

COMMAND_OPTION description-- glob execution wildcard-- jar specifies jar name-h |-- help print help

Print the Hadoop jar you need to get and the classpath of the class library that must be obtained. If there are no parameters, print the entire

Classpath . Extra option to print the classpath after the wildcard extension or the manifest file that writes classpath to the jar file

Medium.

Credential

Usage:

Hadoop credential [options]

The COMMAND_OPTION description create alias [- provider provider-path] prompts the user to store the certificate as the specified alias. The hadoop.security.credential.provider.path in the core-site.xml file will be used unless the-provider parameter is provided. Delete alias [- provider provider-path] [- f] deletes the certificate using the specified alias. Hadoop.security.credential.provider.path in the core-site.xml file will be used unless-provider is specified. If you specify the-f option, you will be asked to confirm the execution of the command. List [- provider provider-path] lists all certificate aliases. Hadoop.security.credential.provider.path for core-site.xml will be used unless-provider is specified.

Command management manages certificates, passwords, and keys in the certificate provider.

Hadoop's CredentialProvider API allows applications to be stored separately from the passwords / keys they need. In order to specify

The type and location of the special provider, which the user must set in the core-site.xml file

Hadoop.security.credential.provider.path configuration element or use the command line option-provider. The provider

The path is a comma-separated URL list of provider types and locations. For example:

User:///,jceks://file/tmp/test.jceks,jceks://hdfs@nn1.example.com/my/path

/ test.jceks

Indicates that the certificate file of the current user is obtained through User Provider, and the local file system is located at / tmp/test.jceks is Java

Nn1.example.com/my/path/test.jceks in the Keystore Provider,HDFS file system is also Java

Keystore Provider .

When using the certificate command, it provides a password or secret key to a specific certificate store provider. In order to clearly specify the provider storage location

Use the-provider option. Otherwise, multiple providers are specified, and the first non-instantaneous provider is used.

Example:

Hadoop credential list-provider jceks://file/tmp/test.jceks

Distcp

Copy files and directories recursively.

Fs

Equivalent to the hdfs dfs command in HDFS.

Jar

Usage:

Hadoop jar [mainClass] args...

Run the jar file.

Use yarn jar to load the YARN application.

Key

Manage keys through KeyProvider.

Trace

Browse and modify Hadoop tracking settings.

Version

Usage:

Hadoop version

Print the version.

Classname

Usage:

Hadoop CLASSNAME

Run the class with the class name CLASSNAME.

1.2 Administrator commands

The command used by the Hadoop cluster administrator.

Daemonlog

Usage:

Hadoop daemonlog-getlevel

Hadoop daemonlog-setlevel

COMMAND_OPTION description-getlevel prints the level of logs that run in the background host:httpport with fully qualified class names. The command internal link http:///logLevel?log=-setlevel sets the level of logs that run in the background host:httpport to fully qualify the class name. The command internal link http:///logLevel?log=&level= on "how to use the Hadoop command" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report