Ok, I managed to fix this. I used https://www.cloudera.com/documentation/enterprise/5-7-x/topics/cdh_ig_yarn_tuning.html and downloaded spreadsheet file. I used values from this spread sheet and put it in my config. Becouse I used CM for install to config this its necesary to go to http://ip:7180/cmf/home click on Yarn(M2 included). Then click on configuration. In search bar use yarn.nodemanager.resource.memory-mb and change it for around 4-8 times more than yarn.scheduler.minimum-allocation-mb. I put in yarn.scheduler.minimum-allocation-mb 1024 and in yarn.nodemanager.resource.memory-mb and everything worked. I was able to use example for uppertext.
... View more