'Attempts to register wth the data master.'

def Register(self):

    logging.info('Registering    with    data    master    at    %s:%d.', self.master_addr, self.master_port)
    started = time.time()
    while True:
        if self._DoRegister():
            break
        logging.warning('Failed    to    connect    with    master    on    %s:%d', self.master_addr, self.master_port)
        if ((time.time() - started) > self.MASTER_RECONNECTION_TIME):
            raise errors.DataServerError(('Could    not    connect    to    data    master    at    %s:%d' % (self.master_addr, self.master_port)))
        time.sleep(2)
    self.registered = True
