I need to check on my jar file arguments validity when the run method
is called by the ToolRunner
public int run(String[] args) throws Exception
{
Path filePath = new Path(args[3]);
FileSystem fs= path .getFileSystem(new Configuration());
if(!fs.exists(path ))
{
// Do things
}
}
The stang part is that the above code works file in my Eclipse local
run but when I move the code to the cluster, it works for the path in
hdfs but if the path (arg[3]) is on local file system like
/tmpFolder/myfile, then the above code report the file as not existing
where the file is there for sure. What I am doing wrong?