'Obtain and print replication statistics
:param hosts: set of hosts to check. in the format of:
set([(\'127.0.0.1\', 6020), (\'127.0.0.2\', 6030)])'

def replication_check(self, hosts):

    stats = {'replication_time': [], 'failure': [], 'success': [], 'attempted': []}
    recon = Scout(('replication/%s' % self.server_type), self.verbose, self.suppress_errors, self.timeout)
    print(('[%s]    Checking    on    replication' % self._ptime()))
    least_recent_time = 9999999999
    least_recent_url = None
    most_recent_time = 0
    most_recent_url = None
    for (url, response, status, ts_start, ts_end) in self.pool.imap(recon.scout, hosts):
        if (status == 200):
            stats['replication_time'].append(response.get('replication_time', response.get('object_replication_time', 0)))
            repl_stats = response.get('replication_stats')
            if repl_stats:
                for stat_key in ['attempted', 'failure', 'success']:
                    stats[stat_key].append(repl_stats.get(stat_key))
            last = response.get('replication_last', response.get('object_replication_last', 0))
            if (last < least_recent_time):
                least_recent_time = last
                least_recent_url = url
            if (last > most_recent_time):
                most_recent_time = last
                most_recent_url = url
    for k in stats:
        if stats[k]:
            if (k != 'replication_time'):
                computed = self._gen_stats(stats[k], name=('replication_%s' % k))
            else:
                computed = self._gen_stats(stats[k], name=k)
            if (computed['reported'] > 0):
                self._print_stats(computed)
            else:
                print(('[%s]    -    No    hosts    returned    valid    data.' % k))
        else:
            print(('[%s]    -    No    hosts    returned    valid    data.' % k))
    if (least_recent_url is not None):
        host = urlparse(least_recent_url).netloc
        if (not least_recent_time):
            print(('Oldest    completion    was    NEVER    by    %s.' % host))
        else:
            elapsed = (time.time() - least_recent_time)
            (elapsed, elapsed_unit) = seconds2timeunit(elapsed)
            print(('Oldest    completion    was    %s    (%d    %s    ago)    by    %s.' % (self._ptime(least_recent_time), elapsed, elapsed_unit, host)))
    if (most_recent_url is not None):
        host = urlparse(most_recent_url).netloc
        elapsed = (time.time() - most_recent_time)
        (elapsed, elapsed_unit) = seconds2timeunit(elapsed)
        print(('Most    recent    completion    was    %s    (%d    %s    ago)    by    %s.' % (self._ptime(most_recent_time), elapsed, elapsed_unit, host)))
    print(('=' * 79))
