hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damien Carol (JIRA)" <>
Subject [jira] [Commented] (HIVE-7470) Wrong Thrift declaration for {{ShowCompactResponseElement}}
Date Tue, 22 Jul 2014 08:56:38 GMT


Damien Carol commented on HIVE-7470:

Exception are throws because show_compact() return object {{ShowCompactResponse}}.

Main property of {{ShowCompactResponse}} is a list of  {{ShowCompactResponseElement}}

Thrift definition of {{ShowCompactResponseElement}} is :

struct ShowCompactResponseElement {
    1: required string dbname,
    2: required string tablename,
    3: required string partitionname,
    4: required CompactionType type,
    5: required string state,
    6: required string workerid,
    7: required i64 start,
    8: required string runAs,

But in metastore database, table which store compactions infos is defined with non required
properties :
  "CQ_ID" bigint NOT NULL,
  "CQ_DATABASE" character varying(128) NOT NULL,
  "CQ_TABLE" character varying(128) NOT NULL,
  "CQ_PARTITION" character varying(767),
  "CQ_STATE" character(1) NOT NULL,
  "CQ_TYPE" character(1) NOT NULL,
  "CQ_WORKER_ID" character varying(128),
  "CQ_START" bigint,
  "CQ_RUN_AS" character varying(128),

Also, ACID code store NULL values in this table.
This throws exceptions when doing {{SHOW COMPACTIONS}} in CLI because metastore Thrift server
try to send {{ShowCompactResponseElement}} with required properties to NULL.

Properties that throws errors :
1. {{partitionname}}, when the table have no partition
2. {{workerid}}, {{start, {{runAs}} when the table have partitions

> Wrong Thrift declaration for {{ShowCompactResponseElement}}
> -----------------------------------------------------------
>                 Key: HIVE-7470
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Thrift API
>    Affects Versions: 0.14.0
>            Reporter: Damien Carol
>            Assignee: Damien Carol
>            Priority: Minor
>              Labels: metastore, thrift
>             Fix For: 0.14.0
> Prerequiste :
> 1. Remote metastore
> 2. Activate ACID and compactions
> 3. Launch ALTER TABLE foo COMPACT 'bar'
> 4. Call {{show_compact()}} on remote metastore
> This use case throws exception in Thrift stack.

This message was sent by Atlassian JIRA

View raw message