I want to increase my namenode Java heap size.
I put the namenode in maintenance mode, but configs are still disables. I even turned off all HDFS services. but it didn't work either.
Can you please explain in detail like what do you mean by "configs are still disables" ?
In order to change the Heap Size configuration you do not need to Put the NameNode in Maintenance mode.
Can you please share the screenshot of the issue?
Did you mean after enabling maintenance mode on namenode, you can not edit the config changes from ambari ? Please note Without enabling maintenance mode you can change the java heap size. Please see article  which talks on how to set namenode heap size. Also, see thread  which also talks on same.