From 290233ea201dfdad7f5c3731bee3b294dbe6a9f1 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Tue, 4 Aug 2009 16:45:07 -0700 Subject: [PATCH] Hadoop: time conversion between Ceph and Hadoop; ditch filling in the uid/gid since it's meaningless. --- src/client/hadoop/ceph/CephFileSystem.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/client/hadoop/ceph/CephFileSystem.java b/src/client/hadoop/ceph/CephFileSystem.java index da899a4d12aa6..e38ae66533927 100644 --- a/src/client/hadoop/ceph/CephFileSystem.java +++ b/src/client/hadoop/ceph/CephFileSystem.java @@ -239,16 +239,22 @@ public class CephFileSystem extends FileSystem { public FileStatus getFileStatus(Path p) throws IOException { debug("getFileStatus:enter with path " + p); Path abs_p = makeAbsolute(p); + //sadly, Ceph doesn't really do uids/gids just yet, but + //everything else is filled // For the moment, hardwired replication int replication = 2; FileStatus status; Stat lstat = new Stat(); if(ceph_stat(abs_p.toString(), lstat)) { + debug("getFileStatus: mod_time is " + lstat.mod_time); status = new FileStatus(lstat.size, lstat.is_dir, replication, - lstat.block_size, lstat.mod_time, lstat.access_time, + lstat.block_size, + //these times in seconds get converted to millis + lstat.mod_time*1000, + lstat.access_time*1000, new FsPermission((short)lstat.mode), - new Integer(lstat.user_id).toString(), - new Integer(lstat.group_id).toString(), + null, + null, new Path(fs_default_name+abs_p.toString())); } else { //fail out -- 2.39.5