[Hadoop-Yarn] Yarn's common commands
- 1) View the task list
- 2) kill task
- 3) View logs
- 4) Filter tasks based on Application status
- 5) Query Container logs
- 6) View the tasks that are trying to run
- 7) yarn container view container
- 8) yarn node view node status
- 9) yarn rmadmin update configuration
- 10) yarn queue view queue
- 11) core parameters of yarn production environment
1) View the task list
yarn application -list
2) kill task
yarn application -kill application_id
3) View logs
yarn logs -applicationId application_id> application_id.log
4) Filter tasks based on Application status
yarn application -list -appStates FINISHED
(all states: ALL, NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED)
5) Query Container logs
yarn logs -applicationId <ApplicationId> -containerId <ContainerId>
6) View the tasks that are trying to run
List all Application attempts:yarn applicationattempt -list <ApplicationId>
Print ApplicationAttemp status:yarn applicationattempt -status <ApplicationAttemptId>
7) yarn container view container
List all Application attempts:yarn container -list <ApplicationAttemptId>
Print Container status:yarn container -status <ContainerId>
8) yarn node view node status
List all nodes:yarn node -list -all
9) yarn rmadmin update configuration
Load queue configuration:yarn rmadmin -refreshQueues
10) yarn queue view queue
Print queue information:yarn queue -status