org.apache.hadoop.security.AccessControlException: /user/rstudio (is not a directory)

269 Views Asked by At

I get this error when I try the command in R > f = hdfs.file('./foo.data', 'r').

When I run # hdfs dfs -ls /user/ I get

Found 1 items
-rw-r--r--   3 rstudio supergroup    3974305 2019-11-09 19:06 /user/rstudio

And when I try to create the directory I get

# hdfs dfs -mkdir /user/rstudio/
mkdir: `/user/rstudio': Is not a directory

Also when I run in R > hdfs.file.info('./') I get

perms isDir     block replication   owner      group    size              modtime
1 rw-r--r-- FALSE 134217728           3 rstudio supergroup 3974305 51826-10-07 23:50:34
  path
1   ./

Reinforcing that /user/rstudio is not a directory.

1

There are 1 best solutions below

0
OneCricketeer On BEST ANSWER

It isn't.

-rw-r--r-- would have to start with a d in order to be a directory.

You must delete the file using hdfs dfs -rm, then use the mkdir command