'Call data server to count how much data needs to move in rebalancing.'

def HandleRebalanceStatistics(self):

    reb = rdf_data_server.DataServerRebalance.FromSerializedString(self.post_data)
    mapping = reb.mapping
    index = 0
    if (not self.MASTER):
        index = self.DATA_SERVER.Index()
    moving = rebalance.ComputeRebalanceSize(mapping, index)
    reb.moving.Append(moving)
    body = reb.SerializeToString()
    self._Response(constants.RESPONSE_OK, body)
