0

Is there anyway to specify the inputpath in Hadoop outside the HDFS, I am running a single node cluster and want to access files outside the HDFS, so is there any way to do this???

1 Answers1

1

Yes. Just give the complete path of your file on the local FS. Don't forget to add "file://". To be on the safer side, don't add reference to the config file in your code, if you have done so.

Tariq
  • 34,076
  • 8
  • 57
  • 79
  • This is the path I am trying to set FileInputFormat.addInputPath(conf, new Path("/hduser/Analysis/Input")); but i get riviledgedActionException as:hduser cause:org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: hdfs://localhost:54310/hduser/Analysis/Input – Aparajith Chandran Apr 16 '13 at 13:46
  • 1
    try "file:///hduser/Analysis/Input" – Tariq Apr 16 '13 at 13:53
  • you'r welcome buddy..the scheme is actually very important, file:// in your case. – Tariq Apr 16 '13 at 14:02
  • one thing related to that, the specified path should exist in all of the local file system. otherwise, you may get several exception and when the specified path is found in a local fs, it will give you output but will slow your speed down – smttsp Apr 16 '13 at 16:21