Default Hortonworks Sandbox 2.3.2 running in VirtualBox on Mac El Capitan. I noticed when using the HDFS file manager GUI (at http://sandbox.hortonworks.com:8080/#/main/views/... ), any directories or files created are owned by "admin". Then, if I create directories or files by connecting to HDFS from the hadoop 2.7.1 command line client, they're owned by "matthew" (my Mac account name):
$ bin/hadoop fs -ls hdfs://sandbox.hortonworks.com:8020/tmp/bar15/12/18 10:25:33 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Found 2 items -rw-r--r-- 3 matthew hdfs 116795988 2015-12-17 17:17 hdfs://sandbox.hortonworks.com:8020/tmp/bar/sh111.txt -rw-r--r-- 3 matthew hdfs 19465998 2015-12-17 17:13 hdfs://sandbox.hortonworks.com:8020/tmp/bar/sh19mb.txt
After creating those files, I can't delete them using the HDFS file manager GUI -- there is no delete (trash can) icon for the files owned by "matthew".
I then tried to delete them via hadoop 2.7.1 with command
bin/hadoop fs -rm -r -f hdfs://sandbox.hortonworks.com:8020/tmp/bar
and I get an exception that starts with
org.apache.hadoop.security.AccessControlException: Permission denied: user=matthew, access=WRITE, inode="/user/matthew/.Trash/Current/tmp":hdfs:hdfs:drwxr-xr-x
I tried to ls /user/matthew with command
bin/hadoop fs -ls hdfs://sandbox.hortonworks.com:8020/user/matthew
ls: `hdfs://sandbox.hortonworks.com:8020/user/matthew': No such file or directory
How do I remove files created via the hadoop command line client in the Hortonworks Sandbox 2.3.2?
My mac has no user "hdfs".
$ su - hdfs Password: su: Sorry
Am I supposed to ssh into the sandbox and execute these commands?
Further, there is no directory found called "/user/matthew" as I indicated in my original question, so if I'd be chown'ing something that doesn't exist.
Yes , please login into sandbox
http://127.0.0.1:4200 or you can do ssh from mac
HW11326:Downloads nsabharwal$ ssh firstname.lastname@example.org -p 2222
Last login: Thu Dec 17 23:34:06 2015 from 10.0.2.2
[root@sandbox ~]# su - hdfs