首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在Presto中读取dtap:// hive表时总是获得0条记录作为输出?

为什么在Presto中读取dtap:// hive表时总是获得0条记录作为输出?
EN

Stack Overflow用户
提问于 2019-09-25 13:41:48
回答 1查看 955关注 0票数 0

我试图在CDH5.14.2上运行带有Hive的Presto (以下所有版本的详细信息),令人惊讶的是,当我在任何表上运行任何select查询时,都会得到0条记录作为输出。当我在任何表上选择*时,我只会得到所有字段的列表,同样没有数据。所有的表都是外部的蜂窝表,数据都是拼花格式的。

  • Hive 1.1.0
  • Presto 0.223,也是0.219

检查Presto安装中的server.log文件,那里没有错误或警告消息

在Presto 0.219中也尝试过同样的安装,同样的情况

presto:sample_db>从tableName中选择计数(*);

代码语言:javascript
复制
_col0
-------
     0
(1 row)

Query 20190925_125900_00005_8tzp2, FINISHED, 1 node
Splits: 18 total, 18 done (100.00%)
0:01 [0 rows, 0B] [0 rows/s, 0B/s]

描述格式表名的输出--

代码语言:javascript
复制
# col_name              data_type               comment

column1             string
column2             string
column3             string
column4             decimal(6,0)
column5             timestamp

# Partition Information
# col_name              data_type               comment

active                  string

# Detailed Table Information
Database:               db_name
Owner:                  cloudera-vivek
CreateTime:             Sun Nov 25 03:23:06 GMT 2018
LastAccessTime:         UNKNOWN
Protect Mode:           None
Retention:              0
Location:               dtap://dbname/tablename
Table Type:             EXTERNAL_TABLE
Table Parameters:
        EXTERNAL                TRUE
        STATS_GENERATED_VIA_STATS_TASK  true
        numPartitions           2
        numRows                 4142
        transient_lastDdlTime   1543116186

# Storage Information
SerDe Library:          org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe
InputFormat:            org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
OutputFormat:           org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat
Compressed:             No
Num Buckets:            -1
Bucket Columns:         []
Sort Columns:           []
Storage Desc Params:
        serialization.format    1
Time taken: 0.919 seconds, Fetched: 40 row(s)

这可能是因为Hive和Presto之间的版本不匹配吗?我在Presto发布说明中找不到任何类似的东西,在安装过程中还需要添加任何其他.jar或配置文件吗?

非常感谢你的帮助

EN

回答 1

Stack Overflow用户

发布于 2019-09-25 16:19:23

您能试一下msck修复表的名称吗?如这里提到的:https://github.com/prestodb/presto/issues/4109

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58099806

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档