In my hbase cluster, a region server(dfs client) is writing wal to hadoop datanodes.
while writing wal, what happens if all the datanodes in the write pipeline fail?
A region server sits on every datanode in your cluster, bearing in mind that your ideal hadoop setup is fault tolerant, I fail to envisage where you lose i.e all your 10 datanodes all at a go.
While setting up your cluster you should factor datanode failure mechanisms for network and power connections by insulating against physical failure by having backup lines etc.
Otherwise here is an introduction to HBase Mean Time to Recovery (MTTR)