Airflow HiveOperator无法正常工作

Sak*_*kib 3 python hive python-2.7 airflow

我试图在气流中使用蜂巢操作员.我安装了所有依赖项(pyhs2,pyhive和run pip install airflow [hive]).

但是当我使用下面的代码时

t1 = HiveOperator(
    task_id='simple_query',
    hql='select * from cities',
    dag=dag)
Run Code Online (Sandbox Code Playgroud)

我收到这个错误.我不确定这意味着什么

[2016-01-06 03:26:39,500] {models.py:1017} ERROR - [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 977, in run
    result = task_copy.execute(context=context)
  File "/usr/local/lib/python2.7/dist-packages/airflow/operators/hive_operator.py", line 65, in execute
    self.hook.run_cli(hql=self.hql, schema=self.schema)
  File "/usr/local/lib/python2.7/dist-packages/airflow/hooks/hive_hooks.py", line 110, in run_cli
    cwd=tmp_dir)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
[2016-01-06 03:26:39,512] {models.py:1053} ERROR - [Errno 2] No such file or directory
Run Code Online (Sandbox Code Playgroud)

小智 5

hive您的系统路径中没有命令行界面(CLI)时,会发生此错误.