4

我正在尝试在气流中使用蜂巢操作员。我安装了所有依赖项(pyhs2、pyhive 并运行了 pip install airflow[hive])。

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

t1 = HiveOperator(
    task_id='simple_query',
    hql='select * from cities',
    dag=dag)

我得到这个错误。我不确定这意味着什么

[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
4

1 回答 1

6

hive命令行界面 (CLI) 在您的系统路径中不可用时,会发生此错误。

于 2016-04-22T04:57:53.840 回答