What Do I Do If Data Fails to Be Written to a Table Because the Namespace of the Table Is Different from That of the /tmp Directory in the Federation Scenario?
Question
In the federation scenario, when data is written in a table(for example, insert), error information similar to the following is displayed:
Error moving data files from hdfs://nsfed/tmp/hetuengine/presto-hetutest/.9f23b71e-234d-768a-8b93f-cdee9297f25f.crc to final location hdfs://nsfed/user/hive/warehouse/hetutb/20230928_022345_00209_ajke4@default@HetuEngine_234d-768a-8b93f-cdee92dqeqef
Answer
In the federation scenario, /tmp and /user are mounted to different NameServices. However, the path prefix is hdfs://nsfed, and NameService is not explicitly used. As a result, the file fails to be moved. Use either of the following methods to solve the problem:
- Explicitly specify NameService in location when creating a table. The following is an example:
- Add hive.temporary-staging-directory-path=/user/tmp/hetuengine/presto-${USER} to the Hive data source configuration.
- Log in to FusionInsight Manager as a HetuEngine administrator and choose Cluster > Services > HetuEngine. The HetuEngine service page is displayed.
- In the Basic Information area on the Dashboard page, click the link next to HSConsole WebUI. The HSConsole page is displayed.
- Click Data Source. Locate the row that contains the data source where Hive table creation is queried, and click Edit in the Operation column.
- Add a custom configuration. Set the parameter name to hive.temporary-staging-directory-path and the value to /user/tmp/hetuengine/presto-${USER}.
- Confirm that the information is correct and click OK. Wait for about 1 minute and run the query statement again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot