I am using HDP for windows (18.104.22.168) single node and Eclipse as development environment. Below are few samples to read and write to HDFS.
- Create a new Java Project in Eclipse.
- In Java Settings go to Libraries and add External JARs. Browse to Hadoop installation folder and add below JAR file.Hadoop-core.jar
- Go into lib folder and add below JAR files.common-configuration-1.6.jar