Currently the DFS cluster upgrade procedure is manual.
http://wiki.apache.org/lucene-hadoop/Hadoop_Upgrade
It is rather complicated and does not guarantee data recoverability in case of software errors or administrator mistakes.
This is a description of utilities that make the upgrade process almost automatic and minimize chance of loosing or corrupting data.
Please see the attached html file for details.