Exemplo n.º 1
0
 def __init__(self, pulsar_client, job_wrapper, remote_job_config):
     self.pulsar_client = pulsar_client
     self.job_wrapper = job_wrapper
     print "From runner/pulsar, job_wrapper: "
     print self.job_wrapper
     print " All done"
     self.local_path_config = job_wrapper.default_compute_environment()
     self.unstructured_path_rewrites = {}
     # job_wrapper.prepare is going to expunge the job backing the following
     # computations, so precalculate these paths.
     self._wrapper_input_paths = self.local_path_config.input_paths()
     self._wrapper_output_paths = self.local_path_config.output_paths()
     self.path_mapper = PathMapper(
         pulsar_client, remote_job_config,
         self.local_path_config.working_directory())
     self._config_directory = remote_job_config["configs_directory"]
     self._working_directory = remote_job_config["working_directory"]
     self._sep = remote_job_config["system_properties"]["separator"]
     self._tool_dir = remote_job_config["tools_directory"]
     version_path = self.local_path_config.version_path()
     new_version_path = self.path_mapper.remote_version_path_rewrite(
         version_path)
     if new_version_path:
         version_path = new_version_path
     self._version_path = version_path
Exemplo n.º 2
0
 def _path_mapper(self, expected_path, expected_type, staging_needed=True):
     action_mapper = TestActionMapper(expected_path, expected_type,
                                      staging_needed)
     path_mapper = PathMapper(
         client=None,
         remote_job_config=self.__test_remote_config(),
         local_working_directory=self.temp_directory,
         action_mapper=action_mapper,
     )
     return path_mapper