From: Michael Vrable Date: Mon, 26 Sep 2011 08:23:16 +0000 (-0700) Subject: Merge ssh://vrable1.sysnet.ucsd.edu/scratch/bluesky X-Git-Url: http://git.vrable.net/?p=bluesky.git;a=commitdiff_plain;h=f25981daece838a116a21ba8a7dc89582f1641d5;hp=0f2bdaba638e7b07d4504279c4580ad0cb174a9f Merge ssh://vrable1.sysnet.ucsd.edu/scratch/bluesky --- diff --git a/cleaner/cleaner b/cleaner/cleaner index 93feef4..f2dcfcb 100755 --- a/cleaner/cleaner +++ b/cleaner/cleaner @@ -21,6 +21,15 @@ HEADER_SIZE = struct.calcsize(HEADER_FORMAT) CHECKPOINT_MAGIC = struct.pack('>sys.stderr, "S3 operation failed, retrying..." + print >>sys.stderr, " %s %s %s" % (method, args, kwargs) self.connect() time.sleep(1.0) return method(self, *args, **kwargs) @@ -96,6 +106,9 @@ class S3Backend(Backend): self.path = path self.cachedir = cachedir self.cache = {} + for f in os.listdir(cachedir): + self.cache[f] = True + #print "Initial cache contents:", list(self.cache.keys()) self.connect() self.stats_get = [0, 0] self.stats_put = [0, 0] @@ -159,6 +172,8 @@ class S3Backend(Backend): print "S3 statistics:" print "GET: %d ops / %d bytes" % tuple(self.stats_get) print "PUT: %d ops / %d bytes" % tuple(self.stats_put) + benchlog_write("s3_get: %d", self.stats_get[1]) + benchlog_write("s3_put: %d", self.stats_put[1]) class SimpleBackend(Backend): """An interface to the simple BlueSky test network server.""" @@ -281,7 +296,7 @@ class LogDirectory: self.dir_num = dir self.seq_num = 0 for logname in backend.list(dir): - print "Old log file:", logname + #print "Old log file:", logname loc = backend.name_to_loc(logname[0]) if loc is not None and loc[0] == dir: self.seq_num = max(self.seq_num, loc[1] + 1) @@ -440,12 +455,12 @@ class InodeMap: data = data[self.vvsize:] - print "Inode map:" + #print "Inode map:" for i in range(len(data) // 16): (start, end) = struct.unpack_from("