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

laawzig2  于 2021-06-27  发布在  Hive
关注(0)|答案(1)|浏览(504)

我正试图在cdh5.14.2上运行带有配置单元的presto(下面所有版本的详细信息),令人惊讶的是,当我在任何表上运行任何select查询时,我得到了0条记录作为输出。当我在任何表上选择时,我只得到所有字段的列表,同样没有数据。所有的表都是带有Parquet格式数据的外部配置单元表
配置单元1.1.0
普雷斯托0.223,也是0.219
检查presto installation中的server.log文件,没有错误或警告消息
也尝试了同样的安装与普雷斯托0.219,同样的情况
presto:sample_db>从tablename中选择count(
);

  1. _col0
  2. -------
  3. 0
  4. (1 row)
  5. Query 20190925_125900_00005_8tzp2, FINISHED, 1 node
  6. Splits: 18 total, 18 done (100.00%)
  7. 0:01 [0 rows, 0B] [0 rows/s, 0B/s]

描述格式化tablename的输出--

  1. # col_name data_type comment
  2. column1 string
  3. column2 string
  4. column3 string
  5. column4 decimal(6,0)
  6. column5 timestamp
  7. # Partition Information
  8. # col_name data_type comment
  9. active string
  10. # Detailed Table Information
  11. Database: db_name
  12. Owner: cloudera-vivek
  13. CreateTime: Sun Nov 25 03:23:06 GMT 2018
  14. LastAccessTime: UNKNOWN
  15. Protect Mode: None
  16. Retention: 0
  17. Location: dtap://dbname/tablename
  18. Table Type: EXTERNAL_TABLE
  19. Table Parameters:
  20. EXTERNAL TRUE
  21. STATS_GENERATED_VIA_STATS_TASK true
  22. numPartitions 2
  23. numRows 4142
  24. transient_lastDdlTime 1543116186
  25. # Storage Information
  26. SerDe Library: org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe
  27. InputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat
  28. OutputFormat: org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat
  29. Compressed: No
  30. Num Buckets: -1
  31. Bucket Columns: []
  32. Sort Columns: []
  33. Storage Desc Params:
  34. serialization.format 1
  35. Time taken: 0.919 seconds, Fetched: 40 row(s)

这可能是因为hive和presto之间的版本不匹配吗?我在presto发行说明中找不到类似的东西,安装时需要添加的任何其他.jar或配置文件?
非常感谢你的帮助

kfgdxczn

kfgdxczn1#

是否可以尝试使用此处提到的msck修复表名称:https://github.com/prestodb/presto/issues/4109 ?

相关问题