首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Presto调用system.create_empty_partition()错误

Presto调用system.create_empty_partition()错误
EN

Stack Overflow用户
提问于 2019-01-29 10:14:22
回答 1查看 601关注 0票数 0

环境

  • 普雷斯托0.215
  • 普雷托-克莱伊0.215
  • presto-jdbc 0.215

由Presto创建的蜂巢表

代码语言:javascript
复制
CREATE TABLE hive.origin.test_part (
    id int,
    date_key int
)
WITH (
    format = 'ORC',
    partitioned_by = ARRAY['date_key'],
    external_location = '/user/hive/warehouse/origin.db/test_part/'
)

Presto JDBC和CLI均成功插入

分区'20190122‘之前不存在,插入成功,这意味着将tmp目录重命名为/user/hive/warehouse/origin.db/test_part/date_key=20190122成功。

hdfs中的/user/hive/warehouse/origin.db/test_part/date_key=20190122/

但是Presto调用system.create_empty_partition()失败

CALL system.create_empty_partition( schema_name => 'origin', table_name => 'test_part', partition_columns => ARRAY['date_key'], partition_values => ARRAY['20190121'])

全错误信息

代码语言:javascript
复制
com.facebook.presto.spi.PrestoException: Failed to rename hdfs://datacenter1:8020/tmp/presto-hive/b87162e5-9e48-4d43-a0e7-ecf0994fe625/date_key=20190121 to hdfs://datacenter1:8020/user/hive/warehouse/origin.db/test_part/date_key=20190121: rename returned false
    at com.facebook.presto.hive.metastore.SemiTransactionalHiveMetastore.renameDirectory(SemiTransactionalHiveMetastore.java:1787)
    at com.facebook.presto.hive.metastore.SemiTransactionalHiveMetastore.access$2700(SemiTransactionalHiveMetastore.java:87)
    at com.facebook.presto.hive.metastore.SemiTransactionalHiveMetastore$Committer.prepareAddPartition(SemiTransactionalHiveMetastore.java:1177)
    at com.facebook.presto.hive.metastore.SemiTransactionalHiveMetastore$Committer.access$700(SemiTransactionalHiveMetastore.java:957)
    at com.facebook.presto.hive.metastore.SemiTransactionalHiveMetastore.commitShared(SemiTransactionalHiveMetastore.java:885)
    at com.facebook.presto.hive.metastore.SemiTransactionalHiveMetastore.commit(SemiTransactionalHiveMetastore.java:807)
    at com.facebook.presto.hive.HiveMetadata.commit(HiveMetadata.java:1949)
    at com.facebook.presto.hive.CreateEmptyPartitionProcedure.createEmptyPartition(CreateEmptyPartitionProcedure.java:126)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:649)
    at com.facebook.presto.execution.CallTask.execute(CallTask.java:160)
    at com.facebook.presto.execution.CallTask.execute(CallTask.java:60)
    at com.facebook.presto.execution.DataDefinitionExecution.start(DataDefinitionExecution.java:168)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

hdfs中的/tmp/presto-hive/

所以

调用system.create_empty_partition()使用不同的“用户”操作hdfs?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-01-29 16:25:49

这是由于错误阻止它处理非桶形表而导致的失败。它在301发行版中得到了修正。

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

https://stackoverflow.com/questions/54418637

复制
相关文章

相似问题

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