Hive table 未在 cosmos 中创建

The Hive table is not creating in cosmos

我们使用 cygnus 配置了上下文代理,我们遇到的问题很奇怪。

当我在 Context Broker 中插入一种新类型的元素,并且我们订阅了将该元素发送到 cosmos 时,就会发生这种情况。 Cygnus正常发送,并在cosmos中创建对应的hdfs文件,但是cosmos尝试创建Hive时table出现错误。

这就是 cygnus 日志所说的。

05 oct 2015 12:51:43,777 INFO  [SinkRunner-PollingRunner-DefaultSinkProcessor] 
(com.telefonica.iot.cygnus.backends.hdfs.HDFSBackendImpl.provisionHiveTable:225)
- Creating Hive external table=[table_name]

几个小时后,我们收到以下消息:

05 oct 2015 18:00:02,489 ERROR [SinkRunner-PollingRunner-DefaultSinkProcessor] 
(com.telefonica.iot.cygnus.backends.hive.HiveBackend.doCreateTable:77)  
- Runtime error (The Hive table cannot be created.
Hive query='create external table [table_name] (columns) row format serde
'org.openx.data.jsonserde.JsonSerDe' location '[hdfs_folder_location]''. 
Details=org.apache.thrift.transport.TTransportException)
05 oct 2015 18:00:02,490 WARN  [SinkRunner-PollingRunner-DefaultSinkProcessor] 
(com.telefonica.iot.cygnus.backends.hdfs.HDFSBackendImpl.provisionHiveTable:237)
- The HiveQL external table could not be created, but Cygnus can continue working... Check your Hive/Shark installation

在这两个事件之间所有应该添加到 hdfs 中的操作,在我们收到错误之前不会添加它们。

Cygnus 版本为:0.8.2

我们正在使用开放宇宙。

这是 Cygnus 0.8.2 中的一个众所周知的问题,here you can find a workaround. Nevertheless, this has been fixed in Cygnus 0.9.0(为了避免您必须从源安装它,我会在当天上传一个 RPM 到 FIWARE 仓库) .