Hi@Hasid,
To avoid this error, you have to increase heap size for your task. So, you have to add below given property in your mapred-site.xml file.
<property>
<name>mapred.child.java.opts</name>
<value>-Xmx4096m</value>
</property>
Also add this below line in your hadoop-env.sh file.
export HADOOP_OPTS="-Xmx4096m"