2

I have a few hundreds of GB in my hdfs for userA (single node configuration). I would like to transfer all that data to userB wich will be more appropriate for the multi-node configuration I'm setting up.

I tried the following without success:

  • hadoop fs -chown -R userB:hadoop PATH, when logged as userB I can't see the data, fine with userA although userB is set as hdfs owner.
  • tried start-all.sh as userB, needed to change a few access controls to that. Same thing I see nothing.
  • tried to force <name>hadoop.tmp.dir</name> on userA
  • tried to rename hadoop-userA dir into hadoop-userB
    When listing the directory I have the following
    drwxr-xr-x - userB hadoop 0 2011-05-29 18:17 /user/userA/tmp

Looks like the data is still owned by userA. Any idea how to fix that?

ADDITION userB is in the group hadoop (of course).

millebii
  • 161
  • 8

3 Answers3

1

To make it work you need to do the following:

  • make sure userB can write in the logs directory
  • make sure userB can write in dfs/ directories
  • make sure userB has read access to the directory hadoop fs -chown userB:hadoop

Data will stay at /user/userA/ so you need to query using absolute path

hadoop fs -ls /user/userA/<path>

Using relative path is going to point you at different location

hadoop fs -ls

Dan R
  • 2,275
  • 1
  • 19
  • 27
millebii
  • 161
  • 8
0

Try setting read permissions:

hadoop fs -chmod -R 644 PATH
johndodo
  • 125
  • 1
  • 6
  • @johndodo as you can see in the post my access right are `755` so it doesn't help. –  May 29 '11 at 21:51
  • No, I didn't see that - did you add it after I answered? Anyway, please be more specific what fails. What you do, what is the result, what is the expected result... From what you posted it should work. Also, do you use Cloudera Hadoop? Which version of Hadoop? –  May 30 '11 at 09:47
  • @johndodo I use hadoop 19 which goes with Nutch1.0, I have added my own answer since I found what was not working. –  May 30 '11 at 15:29
0

You have to copy the data to your local disk and then reupload with the other user.

  • There should be no need for this. That would solve the problem, true, but it's a workaround. Or am I missing something? –  May 30 '11 at 09:50