Commits

Adam Lindsay  committed bc5ada6

Quietened the output, first steps (commented) to storage rebalancing on add

  • Participants
  • Parent commits 31c8b79

Comments (0)

Files changed (2)

File diststore.thrift

 
 include "locator.thrift"
 
+# struct StarterPackage {
+#  1: list<locator.Location> nodes,
+#  2: map<string, string>    store,
+# }
+
 service Store extends locator.Locator {
- string     get     (1:string key)
- void       put     (1:string key, 2:string value)
+ string         get     (1:string key)
+ void           put     (1:string key, 2:string value)
+# StarterPackage join    (1:locator.Location location)
 }

File storeserver.py

         Parameters:
          - key
         """
-        print self.ring.nodes
         dest = self.get_node(key)
-        print dest
         if location.loc2str(dest) == self.here:
             if key in self.store:
                 print 'found %s' % key
                 self.remove(tx.location, map(location.str2loc, self.ring.nodes))
                 return None
     
+    def ping(self):
+        'Make it quiet for the example'
+        pass
+    
+    # def add(self, loc, authorities):
+    #     location.LocatorHandler.add(self, loc, authorities)
+    #     locstr = location.loc2str(loc)
+    #     for key, value in self.store.items(): 
+    #         if location.loc2str(self.get_node(a)) == locstr:
+    #             try:
+    #                 remote_call(loc, 'put', key, value)
+    #             except location.NodeNotFound, tx:
+    #                 pass
+    
     def debug(self):
         a = "self.location: %r\n" % self.location
         a += "self.ring.nodes:\n%r\n" % self.ring.nodes