def _monitor(self):
        # wait until shutdown is called
        while (self.thread_manager.running):
            # check loading every second to see if we should add another
            # thread.
            load = self.calculate_loading()
            if (load > self.load_maximum):
                worker = self._add_thread()
                if (worker is not None):
                    worker.start()
            elif (load < self.load_minimum):
                self._remove_thread()
            self.thread_manager.sleep(10)
        # wait for any existing work to finish
        self.logger.debug('MonitorThread waiting for tasks to finish')
        self.tasks.join()
        self.logger.debug('MonitorThread finishing')
        # now, managed thread can exit so program can close cleanly
Tries to transform, but no Hadoop cluster is available.
dataset/ETHPy150Open StorjOld/downstream-farmer/downstream_farmer/utils.py/ThreadPool._monitor--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/Data-Pipeline/app/src/hadoop/hadoop_csv_transformer_test.py/HadoopCsvTransformerTest.testTransform_NoHadoopCluster