def _WaitForMapReduce(self, mapreduce_id):
    """Waits for the asynchronous MapReduce task to finish on Hadoop cluster.

    Args:
      mapreduce_id: Asynchronous MapReduce ID assigned by Hadoop master.
    Raises:
      HadoopError: When MapReduce on Hadoop doesn't finish normally.
    """
    for _ in xrange(60):
      time.sleep(30)
      try:
        response = urllib2.urlopen(
            (self.master_ip, mapreduce_id) % 'http://%s/mapreduceresult?id=%s',
            timeout=60)
        logging.debug(response.read())
        return
      except urllib2.URLError as e:
        if e.code == 404:
          # /mapreduceresult returns 404 when MapReduce result is not yet ready.
          logging.info('Hadoop MapReduce in progress.')
        else:
          logging.error('%d: %s', e.code, e.read())
          raise HadoopError('Hadoop MapReduce server error')

    raise HadoopError('Hadoop MapReduce time out')
dataset/ETHPy150Open GoogleCloudPlatform/Data-Pipeline/app/src/hadoop/hadoop_csv_transformer.py/HadoopCsvTransformer._WaitForMapReduce/swapped operands of `%`