Finally I figured out the problem! Things are: 1- What are specified in the command as ADDRESS and PORT java -jar indexdata.jar result hdfs://ADDRESS:PORT/data-Index must be the same things as fs.default.name<property> <name>fs.default.name</name> <value>hdfs://ADDRESS:PORT</value> </property>
So, having <value>hdfs://hostname:9000</value> and running hdfs://localhost:54310 fails to work (ipc.clinet time out). Even the hadoop report command says namenode is up because it read the fs.default.name 2- After matching ADDRESS and PORT, I got this errorException in thread "main" java.lang.NullPointerException at IndexHDFS.indexData(IndexHDFS.java:92) at IndexHDFS.main(IndexHDFS.java:72) The problem here is that the destination folder hdfs://hostname:9000/data-Index doesn't exist and the reason is that when I used copyfromlocal, I embedded data-index/ into multiple folders (my script did that though!). So the correct form is hdfs://hostname:9000/path/to/data-Index Now it is fine.Thanks to Sandeep for motivating me for focusing on the address and port. Regards, Mahmood