This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Yes, you have to rewrite your program to make it work over a cluster (distributed computing). Hadoop is a framework that makes the rewriting easier.
In my book, I gave an example of writing a word counting program. Writing such a program to run on a single machine is easy. Writing it to run on a cluster of machines introduces a lot of complexity. The Hadoop framework eliminates much of that complexity, but the program will have to be architected differently.