Exemplo n.º 1
0
 def __init__(self, script_home, conf):
     self.script_home = script_home
     self.conf = conf
     self.master = es.Client(script_home,
                             'bin/hbase.py',
                             hosts=[conf['master']],
                             input=conf)
     slavehosts = [
         h for h in conf['regionservers'].split(',') if h != conf['master']
     ]
     self.slave = es.Client(script_home,
                            'bin/hbase.py',
                            hosts=slavehosts,
                            input=conf)
Exemplo n.º 2
0
 def __init__(self, script_home, conf):
     self.script_home = script_home
     self.conf = conf
     self.configsvr = es.Client(script_home,
                                'bin/mongodb.py',
                                hosts=self.conf['configsvr'].split(','),
                                input=self.conf)
     self.shardsvr = es.Client(script_home,
                               'bin/mongodb.py',
                               hosts=self.conf['shardsvr'].split(','),
                               input=self.conf)
     self.mongos = es.Client(script_home,
                             'bin/mongodb.py',
                             hosts=self.conf['mongos'].split(','),
                             input=self.conf)
Exemplo n.º 3
0
 def __init__(self, script_home, conf):
     self.script_home = script_home
     self.conf = conf
     self.server = es.Client(script_home,
                             'bin/tokumx.py',
                             hosts=self.conf['hosts'].split(','),
                             input=self.conf)
Exemplo n.º 4
0
 def __init__(self, script_home, conf, hbconf):
     self.script_home = script_home
     self.conf = conf
     self.conf['hbase'] = hbconf
     self.server = es.Client(script_home,
                             'bin/omid.py',
                             hosts=self.conf['hosts'].split(','),
                             input=self.conf)
Exemplo n.º 5
0
 def restart(self):
     self.stop()
     time.sleep(1)
     self.configsvr.command('start-configsvr')
     self.shardsvr.command('start-shardsvr')
     self.mongos.command('start-mongos')
     es.Client(self.script_home,
               'bin/mongodb.py',
               hosts=self.conf['mongos'].split(',')[:1],
               input=self.conf).command('addshards-mongos')