def _start_mini_cluster(self, nnport=None):
        """
        Copied in an ugly manner from snakebite source code.
        """
        if self._jobclient_jar:
            hadoop_jar = self._jobclient_jar
        else:
            hadoop_jar = self._find_mini_cluster_jar(self._hadoop_home)
        if not hadoop_jar:
            raise Exception("No hadoop jobclient test jar found")
        cmd = [self._hadoop_cmd, 'jar', hadoop_jar,
               'minicluster', '-nomr', '-format']
        if nnport:
            cmd.extend(['-nnport', nnport % "%s"])
        if True:
            # luigi webhdfs version
            cmd.extend(['-Ddfs.webhdfs.enabled=true'])
        self.hdfs = subprocess.Popen(cmd, bufsize=0, stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE, universal_newlines=True)
dataset/ETHPy150Open spotify/luigi/test/webhdfs_minicluster.py/WebHdfsMiniCluster._start_mini_cluster/swapped operands of `%`