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 yarn management commands

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces how to use yarn management commands, the article is very detailed, has a certain reference value, interested friends must read it!

Among these commands, jar, applocation, node, logs, calsspath, and version are commonly used user commands, while resourcemanager, nodemanager, proxyserver, rmadmin and daemonlog are more commonly used management commands.

Application command:

Used to manage jobs in a yarn cluster

View Job

[hadoop@node1 ~] $yarn application- list18/03/27 17:49:41 INFO client.RMProxy: Connecting to ResourceManager at master/172.16.2.3:8032Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED RUNNING]): 0 Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL

Node: viewing datanode node information

[hadoop@node1] $yarn node-- list

18-03-27 17:55:12 INFO client.RMProxy: Connecting to ResourceManager at master/172.16.2.3:8032

Total Nodes:3

Node-Id Node-State Node-Http-Address Number-of-Running-Containers

Node3.hadooptest.com:56712 RUNNING node3.hadooptest.com:8042 0

Node2.hadooptest.com:55089 RUNNING node2.hadooptest.com:8042 0

Node4.hadooptest.com:56630 RUNNING node4.hadooptest.com:8042 0

Only nodes that view RUNNING status

[hadoop@node1 ~] $yarn node-list-states RUNNING18/03/27 17:58:31 INFO client.RMProxy: Connecting to ResourceManager at master/172.16.2.3:8032Total Nodes:3 Node-Id Node-State Node-Http-Address Number-of-Running-Containersnode3.hadooptest.com:56712 RUNNING node3.hadooptest.com:8042 0node2.hadooptest.com:55089 RUNNING node2.hadooptest.com:8042 0node4.hadooptest.com:56630 RUNNING node4.hadooptest.com:8042 0

View the status of a node

[hadoop@node1 ~] $yarn node-status node3.hadooptest.com:56712 18-03-27 18:00:10 INFO client.RMProxy: Connecting to ResourceManager at master/172.16.2.3:8032Node Report: Node-Id: node3.hadooptest.com:56712 Rack: / default-rack Node-State: RUNNING Node-Http-Address: node3.hadooptest.com:8042 Last-Health-Update: Tue 27/Mar/18 05:59:22: 318CST Health-Report: Containers: 0 Memory-Used: 0MB Memory-Capacity: 8192MB CPU-Used: 0 vcores CPU-Capacity: 8 vcores Node-Labels:

Logs:

Used to get log information from a completed YARN application (that is, with a status of FAILED, KILLED, or FINISHED). However, if you need to view the log from the command line

The log-aggregation attribute needs to be enabled for the YARN cluster, and the value of the yarn.log-aggregation-enable attribute defined in the yarn-site.xml configuration file is true. The brief usage of the command is in the following format

Yarn logs-applicationID

Common options:

-applicationID applicationID: a required option to get its details from ResourceManager

-appOwner AppOwner: optional. Default is the current user.

-nodeAddress NodeAddress-containerId containerID: used to obtain information about the specified container on the specified node, where the format of NodeAddress is the same as NodeId

Rmadmin

-help: get command help

-refreshNode: refreshes the host information for RM. It updates the list of nodes that the cluster needs to include or exclude by reading the include and exclude files of RM nodes.

-refreshUserToGroupsMappings: update the mapping relationship between users and groups by refreshing the information in the group cache according to the configured Hadoop security group mapping

-refreshSuperUserGroupsConfiguration: refresh the superuser agent group mapping and update the agent group defined by the agent host and the hadoop.proxyuser attribute in the core-site.xml configuration file

-refreshAdminAcls: refreshes the management ACL of RM based on the yarn.admin.acl attribute in the yarn site configuration file or default configuration file

[hadoop@node1 ~] $yarn rmadmin-refreshNodes 18-03-27 18:22:43 INFO client.RMProxy: Connecting to ResourceManager at master/172.16.2.3:8033 [hadoop@node1 ~] $

The refresh command should be used with caution, which has a great influence.

DaemonLog

Used to view or update the log level of RM and the NM daemon, which connects directly to "http://host:port/logLevel?log=name service" internally after checking that administrative permissions have been passed.

Common options:

-getLevel host:port name: displays the log level of the specified daemon

-setLevel host:port name level: sets the log level of the daemon

The above is all the contents of the article "how to use yarn Management commands". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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

Internet Technology

Wechat

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

12
Report