Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The external table of hive has been deleted, and I encountered an error when recreating the hive external table. #3083

Closed
2 tasks done
silentxingtian opened this issue Mar 24, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@silentxingtian
Copy link
Contributor

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

0.8-SNAPSHOT

Compute Engine

hive-3.1.3

Minimal reproduce step

When the hive external table has been deleted and there is still have a meta-0 file and data file in HDFS, I need to recreate the hive table, I will receive an error message, the createTable() method in the source code currently does not support recreating the hive table
image

What doesn't meet your expectations?

I hope to recreate the deleted hive external table

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@silentxingtian silentxingtian added the bug Something isn't working label Mar 24, 2024
@silentxingtian
Copy link
Contributor Author

I have fixed this issue. Can I submit it and help me check it

silentxingtian pushed a commit to silentxingtian/paimon that referenced this issue Mar 24, 2024
@wg1026688210
Copy link
Contributor

wg1026688210 commented Mar 25, 2024

hi~ @silentxingtian ,you can try recreating the extern table by using

CREATE EXTERNAL TABLE my_table
STORED BY 'org.apache.paimon.hive.PaimonStorageHandler'
LOCATION 'hdfs:///path/to/table';

https://paimon.apache.org/docs/master/how-to/creating-tables/#creating-external-tables

@silentxingtian
Copy link
Contributor Author

hi~ @silentxingtian ,you can try recreating the extern table by using

CREATE EXTERNAL TABLE my_table
STORED BY 'org.apache.paimon.hive.PaimonStorageHandler'
LOCATION 'hdfs:///path/to/table';

https://paimon.apache.org/docs/master/how-to/creating-tables/#creating-external-tables
i have tried it ,you're right , ”Isn't the implementation of the "CREATE EXPRESS TABLE my_table" statement in the source code a call to the createTable() function? Can you tell me how it is implemented in the source code so that I can learn it

@silentxingtian
Copy link
Contributor Author

My scenario here is that I will call batch write and stream write. When I create a hive external table, I will call the createTable() method. When the hive external table is deleted, I need to recreate the hive table structure in the code. If I call the createTable() method again, an exception will be reported inside

silentxingtian pushed a commit to silentxingtian/paimon that referenced this issue Mar 27, 2024
silentxingtian pushed a commit to silentxingtian/paimon that referenced this issue Apr 8, 2024
silentxingtian pushed a commit to silentxingtian/paimon that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants