56

用户画像系统的作业调度Airflow研究和应用

 5 years ago
source link: http://shujuren.org/article/767.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

用户画像系统从业务入手,全面构建用户的标签体系。标签体系的设计和生成需要多个作业协同和有序工作。而用户画像系统的作业调度,就是用来保证多个作业能够协同有序工作。本文是对开源的作业调度系统Airflow的研究和应用探索。

Airflow环境配置

第一步:构建Linux开发环境 Windows操作系统基于虚拟机构建Linux开发环境。虚拟机用VMware,Linux用CentOS7。 VMware虚拟机中安装CentOS7,参考链接: https://www.cnblogs.com/smyhvae/p/3917532.html

第二步:Linux系统搭建Python工作环境 基于sh安装方式,快速搭建Python工作环境。 执行如下命令:

cd /opt
wget https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
bash Anaconda3-5.2.0-Linux-x86_64.sh

如果执行wget命令报错,表示centOS7没有连接网络。centOS7配置自动连接网络,参考链接: https://jingyan.baidu.com/article/19192ad8f7c320e53e570728.html 命令执行好后,就可以在Linux系统下进行Python的使用了。

第三步:安装airflow 执行命令

pip install airflow
export AIRFLOW_HOME=/home/airflow
# 初始化数据库:
airflow initdb
# 启动服务:
airflow webserver (启动airflow

打开浏览器,输入如下URL http://localhost:8080/admin/ 运行成功出现如下页面: riyYRrf.png!web


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK