예제 #1
0
파일: set.py 프로젝트: vandanabn/oio-sds
 def take_action(self, parsed_args):
     # Adapt the batch size for slow ZK
     batch_size = 2048
     if parsed_args.slow:
         batch_size = 8
     # Send a bootstrap on each ensemble
     ns, cnxstr = self.get_params(parsed_args)
     for zh in get_connected_handles(cnxstr):
         try:
             create_namespace_tree(zh.get(), ns, self.log,
                                   batch_size=batch_size,
                                   precheck=parsed_args.lazy)
         except Exception as ex:
             self.log.exception("Failed to bootstrap TODO: %s", str(ex))
         zh.close()
예제 #2
0
파일: set.py 프로젝트: stjordanis/oio-sds
 def take_action(self, parsed_args):
     # Adapt the batch size for slow ZK
     batch_size = 2048
     if parsed_args.slow:
         batch_size = 8
     # Send a bootstrap on each ensemble
     ns, cnxstr = self.get_params(parsed_args)
     from oio.zk.client import get_connected_handles, create_namespace_tree
     for zh in get_connected_handles(cnxstr, logger=self.log):
         try:
             create_namespace_tree(zh.get(),
                                   ns,
                                   self.log,
                                   batch_size=batch_size,
                                   precheck=parsed_args.lazy)
         except Exception as ex:
             self.log.exception("Failed to bootstrap '%s': %s", zh.cnxstr,
                                ex)
             self.__class__.success = False
         finally:
             zh.close()