An Error Is Reported When the Insert Command Is Executed on the Hive Beeline CLI
Symptom
When the insert into statement is executed in Beeline of MRS Hive, the following error is reported:
Mapping run in Tez on Hive transactional table fails when data volume is high with error: "org.apache.hadoop.hive.ql.lockmgr.LockException Reason: Transaction... already aborted, Hive SQL state [42000]."
Cause Analysis
This problem is caused by improper cluster configuration and Tez resource setting.
Procedure
This problem can be solved by setting configuration parameters on Beeline.
- Set the following properties to optimize performance (you are advised to change them at the cluster level):
- Set hive.auto.convert.sortmerge.join to true.
- Set hive.optimize.bucketmapjoin to true.
- Set hive.optimize.bucketmapjoin.sortedmerge to true.
- Modify the following content to adjust the resources of Tez:
- Set hive.tez.container.size to the size of the Yarn container.
- Set hive.tez.container.size to the Yarn container size yarn.scheduler.minimum-allocation-mb or a smaller value (for example, a half or quarter of the Yarn container size). Ensure that the value does not exceed the yarn.scheduler.maximum-allocation-mb value.
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