Hive memory error while executing the query

Hi,

When I try to execute a query on my movies data set, I am getting the below error.
Please help.
Database name vr_movies

hive (vr_movies)> select u.age,count(*) from users u join ratings r
> on (u.userid = r.userid and r.rating = 5)
> group by u.age;
Query ID = atsbhlab031968_20180829103029_57356f6e-6a43-4742-be92-1399031f7def
Total jobs = 1
Execution log at: /tmp/atsbhlab031968/atsbhlab031968_20180829103029_57356f6e-6a43-4742-be92-1399031f7def.log
2018-08-29 10:30:32 Starting to launch local task to process map join; maximum memory = 523239424
Execution failed with exit status: 2
Obtaining error information

Task failed!
Task ID:
Stage-5

Logs:

/tmp/atsbhlab031968/hive.log