I'm at my wit's end. I want to do a simple test for the existence of a file
on Hadoop. Here is the Ruby code I'm trying:

val = `hadoop dfs -test -e s3n://holeinthebucket/user/hadoop/file.txt`
puts "Val: #{val}"
if val == 1
  // do one thing
else
  // do another
end

I never get  a return value for the -test command. Is there something I'm
missing? How should the return value be retrieved?

Thanks,
SD

Reply via email to