Decommision 1 datanode at a time so that the data get replicated to another node and then go for the next. Make sure there is no underreplicated data in namenodeUI before you decommision another datanode.
Please accept this as sollution if it resolve your issue