ambari 终止 background operations running

in case ambari API doesn't help. You can use following SQL queries to abort hung/queued/pending operations directly from ambari database.

  1. Stop Ambari-Server

ambari-server stop

  1. Take backup of ambari database before making any changes to ambari db

  2. Check IN_PROGRESS, QUEUED and PENDING operations.

ambari=> select task_id,role,role_command from host_role_command where status='IN_PROGRESS';
ambari=> select task_id,role,role_command from host_role_command where status='QUEUED' limit 100;
ambari=> select task_id,role,role_command from host_role_command where status='PENDING';

  1. Abort Operations

ambari=> update host_role_command set status='ABORTED' where status='QUEUED';
ambari=> update host_role_command set status='ABORTED' where status='PENDING';
ambari=> update host_role_command set status='ABORTED' where status='IN_PROGRESS';

  1. Start ambari-server

ambari-server start

 

 


转载:
作者:迷茫_小青年
链接:https://www.jianshu.com/p/e68a3dde44f6

posted @ 2022-06-09 10:47  zk01  阅读(234)  评论(0编辑  收藏  举报