Hive:TApplicationException:Internal Error processing Get_partition_names wrong workaround

Source: Internet
Author: User

Sometimes, some unconventional operations can cause the database/table to be established to conflict with the database/table stored in the Metastore, resulting in the inability to establish the corresponding database/table. For example, if you do not use the regular drop database/table to delete a database or a table, but instead delete the corresponding folder or file directly on HDFs, such as:/user/hive/warehouse/xxxxx.db, Then when you re-try to build the library using the Build library script, you might be able to quote:

Failed:execution Error, return code 1 from Org.apache.hadoop.hive.ql.exec.DDLTask. Org.apache.thrift.TApplicationException:Internal Error processing Get_partition_names

( Note: In order to delete a database completely and cleanly, we can choose to drop a db using the CASCADE keyword, for example: drop database if exists your-database Cascade ;)

Of course, this is the reported partition information is confusing, there may be other meta-data problems, we only use this error message as an example to illustrate the solution:

Yes, the reason is, as mentioned above, you are going to build the library and Metastore in the library to save the metadata conflict, at this time, we can only manually delete the relevant data in Metastore! Connected to the database used by Metastore (this is assumed to be MySQL), this error is related to partition, so we want to clear the partition table information, if we have only one library, we can simply and brutally empty these tables:


TRUNCATE TABLE partition_key_vals;truncate table partition_params;truncate table partitions;

If you have multiple libraries, then you need to use Delete table .... To selectively delete the partition information from the table in the specified library.

Hive:TApplicationException:Internal Error processing Get_partition_names wrong workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.