Presto没有从Hive Metabase返回行

时间:2017-11-13 16:53:15

标签: hadoop hive presto

我对AWS EMR很新。我已经启动并运行Hive并且在S3中查询外部表没有任何问题。我现在已经将Presto安装到EMR集群上,这似乎已经启动并且可以读取Hive元数据库。但是,我运行的每个查询都返回列标题,但实际上不返回任何列(查询如下)。

hive> select * from patrequests limit 10;
OK
2017-10-01T00:00:18.6772628Z    779     *****  *****  *****      *****      2017    10
Time taken: 2.876 seconds, Fetched: 10 row(s)

Hive中的相同查询运行良好:

Sub ResizeAllPicsTo75Pct()
    Const wdInlineShapePicture = 3
    Dim olkMsg As Outlook.MailItem, wrdDoc As Object, wrdShp As Object
    Set olkMsg = Application.ActiveInspector.CurrentItem
    Set wrdDoc = olkMsg.GetInspector.WordEditor
    For Each wrdShp In wrdDoc.InlineShapes
        If wrdShp.Type = wdInlineShapePicture Then
            wrdShp.ScaleHeight = 75
            wrdShp.ScaleWidth = 75
        End If
    Next
    Set olkMsg = Nothing
    Set wrdDoc = Nothing
    Set wrdShp = Nothing
End Sub

数据以JSON格式存储在S3存储桶中 - 无嵌套。

非常感谢任何帮助。

由于

1 个答案:

答案 0 :(得分:0)

问题似乎是JSON Serde org.openx.data.jsonserde.JsonSerDe不可用于Presto。从S3存储桶引导具有以下内容的实例似乎解决了这些问题:

#!/bin/bash
wget -P /usr/lib/presto/plugin/hive-hadoop2/  'https://s3-eu-west-1.amazonaws.com/########/json-serde-1.3.9-SNAPSHOT-jar-with-dependencies.jar';
wget -P /usr/lib/hive-hcatalog/share/hcatalog/ 'https://s3-eu-west-1.amazonaws.com/########/json-serde-1.3.9-SNAPSHOT-jar-with-dependencies.jar';