代码之家  ›  专栏  ›  技术社区  ›  Archon

Presto CLI调用系统。创建\u空\u分区()错误

  •  0
  • Archon  · 技术社区  · 5 年前

    • 普雷斯托0.215
    • presto cli 0.215
    • presto jdbc 0.215

    由Presto创建的配置单元表

    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都插入到成功中

    以前不存在partton“20190122”,插入成功,这意味着重命名 tmp 目录到 /user/hive/warehouse/origin.db/test_part/date_key=20190122

    enter image description here

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

    enter image description here

    但Presto CLI调用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'])

    enter image description here

    完整错误消息

    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)
    

    /tmp/presto-hive/ 在hdfs中

    enter image description here

    调用system.create\u empty\u partition()是否使用不同的“用户”来操作HDF?

    1 回复  |  直到 3 年前
        1
  •  5
  •   David Phillips    5 年前

    bug 这会阻止它与非带扣的桌子一起工作。它是固定的 301 释放

    推荐文章