Help Center/ MapReduce Service/ Component Operation Guide (LTS) (Ankara Region)/ Using HetuEngine/ HetuEngine FAQ/ 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?
Updated on 2024-11-29 GMT+08:00

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.
    1. Log in to FusionInsight Manager as a HetuEngine administrator and choose Cluster > Services > HetuEngine. The HetuEngine service page is displayed.
    2. In the Basic Information area on the Dashboard page, click the link next to HSConsole WebUI. The HSConsole page is displayed.
    3. Click Data Source. Locate the row that contains the data source where Hive table creation is queried, and click Edit in the Operation column.
    4. Add a custom configuration. Set the parameter name to hive.temporary-staging-directory-path and the value to /user/tmp/hetuengine/presto-${USER}.
    5. Confirm that the information is correct and click OK. Wait for about 1 minute and run the query statement again.