Hadoop Distributed File System (HDFS) Java tutorial. This Java tutorial contains examples and Java code on how to create, rename, delete and do much more on Hadoop Distributed File System using the Haddop Java API. Copy a file from the local file system to HDFS The srcFile variable needs to contain the full name (path + file name) of the file in the local file system. The dstFile variable needs to