]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
hadoop: emulate Ceph file owner as current user
authorNoah Watkins <noahwatkins@gmail.com>
Wed, 2 Nov 2011 00:25:49 +0000 (17:25 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Thu, 3 Nov 2011 02:50:56 +0000 (19:50 -0700)
Make CephFileSystem tell Hadoop that the owner
of all files is the current user. This provides
zero security or isolation, but allows Hadoop
to be used with its default security settings.

A future solution will need to be developed that
provides some isolation, and gives a better user
experience.

This fixes tracker issue #1663

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
src/client/hadoop/ceph/CephFileSystem.java

index 431bad6e73c090102239c9d7d290bfeb2cdffb50..abebe28df30168ef048281c0c347fe7707205335 100644 (file)
@@ -415,7 +415,7 @@ public class CephFileSystem extends FileSystem {
       status = new FileStatus(lstat.size, lstat.is_dir,
           ceph.ceph_replication(abs_path.toString()), lstat.block_size,
           lstat.mod_time, lstat.access_time,
-          new FsPermission((short) lstat.mode), null, null,
+          new FsPermission((short) lstat.mode), System.getProperty("user.name"), null,
           new Path(fs_default_name + abs_path.toString()));
     } else { // fail out
       throw new FileNotFoundException(