'Call data server to perform rebalance transaction.'

def HandleRebalancePerform(self):

    reb = rdf_data_server.DataServerRebalance.FromSerializedString(self.post_data)
    if (not rebalance.MoveFiles(reb, self.MASTER)):
        logging.fatal('Failed    to    perform    transaction    %s', reb.id)
        self._EmptyResponse(constants.RESPONSE_FILES_NOT_MOVED)
        return
    if self.DATA_SERVER:
        for (i, serv) in enumerate(list(reb.mapping.servers)):
            self.MAPPING.servers[i].interval.start = serv.interval.start
            self.MAPPING.servers[i].interval.end = serv.interval.end
        self.DATA_SERVER.SetMapping(self.MAPPING)
    stat = self.GetStatistics()
    body = stat.SerializeToString()
    self._Response(constants.RESPONSE_OK, body)
