0

我对色调(3.10 版)有一个奇怪的问题。

我有一个非常简单的蜂巢查询:

drop table if exists csv_dump;
create table csv_dump row format delimited fields terminated by ',' lines terminated by '\n' location '/user/oozie/export' as select * from sample;
  • 在配置单元编辑器中运行此查询有效
  • 将此查询作为 oozie 工作流命令行运行
  • 使用直线运行此查询命令行
  • 通过配置单元中的 oozie 工作流运行此查询失败

在这种情况下失败意味着:

  • drop 和 create 没有运行,或者至少没有任何效果
  • 将执行工作流中的准备操作
  • 工作流程中的 hive2 步骤仍然显示成功
  • 将执行以下步骤。

现在我确实尝试了不同的用户(oozie 和 ambari,将位置调整为相关),成功/失败案例完全相同。

我找不到任何相关的日志,除了可能来自色调:

------------------------

Beeline command arguments :
             -u
             jdbc:hive2://ip-10-0-0-139.eu-west-1.compute.internal:10000/default
             -n
             oozie
             -p
             DUMMY
             -d
             org.apache.hive.jdbc.HiveDriver
             -f
             s.q
             -a
             delegationToken
             --hiveconf
             mapreduce.job.tags=oozie-e686d7aaef4a29c020059e150d36db98

Fetching child yarn jobs
tag id : oozie-e686d7aaef4a29c020059e150d36db98
Child yarn jobs are found - 
=================================================================

>>> Invoking Beeline command line now >>>

0: jdbc:hive2://ip-10-0-0-139.eu-west-1.compu> drop table if exists csv_dump; cr 
eate table csv_dump0 row format delimited fields terminated by ',' lines termina 
ted by '\n' location '/user/ambari/export' as select * from sample;

<<< Invocation of Beeline command completed <<<

 Hadoop Job IDs executed by Beeline: 


<<< Invocation of Main class completed <<<


Oozie Launcher, capturing output data:
=======================
#
#Thu Jul 07 13:12:39 UTC 2016
hadoopJobs=


=======================

Oozie Launcher, uploading action data to HDFS sequence file: hdfs://ip-10-0-0-139.eu-west-1.compute.internal:8020/user/oozie/oozie-oozi/0000011-160707062514560-oozie-oozi-W/hive2-f2c9--hive2/action-data.seq

Oozie Launcher ends

我看到直线开始的地方,但我没有看到像命令行一样分配的任何映射器。

有人知道会出什么问题吗?

谢谢,纪尧姆

4

1 回答 1

1

正如@romain 在评论中解释的那样,需要在 sql 脚本中添加新行。那么一切都很好。

于 2017-03-16T13:59:45.997 回答