- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Rebuilding Materialized View does not work, saying there is another process re-building the MV.
- Labels:
-
Apache Hive
-
Cloudera Hue
Created on 01-26-2023 11:38 PM - edited 01-26-2023 11:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
I am trying to re-build my materialized view (ALTER MATERIALIZED VIEW <db>.<table> REBUILD;). However, I got an error message saying that there is another process re-building the MV.
Error message:
SQL Error [40000] [42000]: Error while compiling statement: FAILED: SemanticException org.apache.hadoop.hive.ql.parse.SemanticException: Another process is rebuilding the materialized view
I tried to check if there is any write lock on the MV or the table, however there is none. I also tried to re-build the MV, but then I got the same error again when I tried to rebuild.
Any idea why this is happening or how to check the "another process"?
Created 02-01-2023 12:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @RobVi ,
Please try to follow the below steps from our article.
https://my.cloudera.com/knowledge/ERROR-quotFAILED-SemanticException?id=340510
Let us know if works.
Good Luck.
Created 02-01-2023 12:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @RobVi ,
Please try to follow the below steps from our article.
https://my.cloudera.com/knowledge/ERROR-quotFAILED-SemanticException?id=340510
Let us know if works.
Good Luck.
Created 02-08-2023 04:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Shmoo ,
Thank you for the suggestion. This works! The MV can be rebuilt after manually deleting the stale locks.
However, the next interesting question would be why do we get the stale lock? If we know why, we could prevent this from happening again, as an access to hive metastore is not something that we want to make available to all users.
Created 02-06-2023 09:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@RobVi Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks
Regards,
Diana Torres,Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
