• airflow_failover启动scheduler


    参考:

    https://github.com/teamclairvoyant/airflow-scheduler-failover-controller

    1.stop failover
    2.stop scheduler
    3.clear failover meta
    4.start failover

    #启动master上的scheduler

    . /data/venv/bin/activate

    supervisorctl status

    supervisorctl  stop airflow_failover

    supervisorctl  stop airflow_scheduler

    scheduler_failover_controller  clear_metadata

    supervisorctl  start  airflow_failover

    #failover命令

    scheduler_failover_controller metadata #Get the Metadata from Metastore
    scheduler_failover_controller clear_metadata #Clear the Metadata in Metastore
    scheduler_failover_controller is_scheduler_running
    #Checks if the Scheduler is running on the machines you have listed in 'scheduler_nodes_in_cluster' config
    scheduler_failover_controller get_current_host #Get the Current Hostname

    scheduler日志满了清理:  这是作业的日志

    find /root/airflow/logs/*  -type f -mtime +7 | xargs rm -f

    软连接:

    cd /var/opt/tableau
    cp -rp ./tableau_server /data
    ln -s /data/tableau_server/ /var/opt/tableau/

    #查看状态:

    vim /hongfeng/scrit/status_check.sh

    ansible airflow -m shell -a '. /data/venv/bin/activate && supervisorctl status'

  • 相关阅读:
    宏定义问题
    (转载)(int)a、&a、(int)&a、(int&)a的区别,很偏僻的题
    boolalpha的作用
    一些小细节
    HTTP Keep-Alive的作用
    数据库三大范式
    laravel 安装语言包
    MySQL存储引擎中的MyISAM和InnoDB区别详解
    推荐一款超好用的工具cmder
    如何保证代码质量
  • 原文地址:https://www.cnblogs.com/hongfeng2019/p/11850867.html
Copyright © 2020-2023  润新知