Can anyone please let me know if there is any way to pass hadoop commands to hdfs (eg: create for delete directory and files"hadoop fs -mkdir /test") from java program? I am trying to create and delete directory and files in hdfs through java program.
Also is there any way to check the size of the files/directory in hdfs through java program. I am trying to check the size of the directory in hdfs and if the size is 0 then I want to delete that file. I need to do all these things through java program.
Please help.