Please find some answers as below:
How to get started ?
Once you have eclipse setup, you would start your Java application just like what you would do when developing normal Java application.
What plugins / libraries do I have to install ?
There are some plugins available in market to try out. To keep it simple you can just add the required libraries to your project.
For instance, if you are using HDFS api’s. the jar’s are usually available @ /usr/lib/hadoop/lib. For Hive the location is /usr/lib/hive/lib and so on
How do I have to structure my code ?
Nothing specific here
How do I get my local program to be executed on my HDP2 ?
Normally, you will bundle your Java code into a jar and use the “hadoop jar <jar-name>” command to run it.
Additionally, setting up a remote debugging will make it easy to debug your code. Please see http://pravinchavan.wordpress.com/2013/04/05/remote-debugging-of-hadoop-job-with-eclipse/
Hope this helps.