Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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).

share|improve this question

migrated from stackoverflow.com May 30 '11 at 20:04

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 1 down vote accepted

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

share|improve this answer

Try setting read permissions:

hadoop fs -chmod -R 644 PATH
share|improve this answer
    
@johndodo as you can see in the post my access right are 755 so it doesn't help. –  millebii 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? –  johndodo May 30 '11 at 9:47
    
@johndodo I use hadoop 19 which goes with Nutch1.0, I have added my own answer since I found what was not working. –  millebii May 30 '11 at 15:29

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.