Ejemplo n.º 1
0
 def list_jobs(
     self,
     include_terminated: bool,
     project: Optional[str] = None,
     table_name: Optional[str] = None,
 ) -> List[SparkJob]:
     """
     List ingestion jobs currently running in Feast.
     Args:
         include_terminated: Flag to include terminated jobs or not
         project: Optionally specify the project to use as filter when retrieving jobs
         table_name: Optionally specify name of feature table to use as filter when retrieving jobs
     Returns:
         List of SparkJob ingestion jobs.
     """
     if not self._use_job_service:
         return list_jobs(include_terminated, self, project, table_name)
     else:
         request = ListJobsRequest(
             include_terminated=include_terminated,
             project=project,
             table_name=cast(str, table_name),
         )
         response = self._job_service.ListJobs(request)
         return [
             get_remote_job_from_proto(self._job_service,
                                       self._feast._extra_grpc_params, job)
             for job in response.jobs
         ]
Ejemplo n.º 2
0
 def get_job_by_id(self, job_id: str) -> SparkJob:
     if not self._use_job_service:
         return get_job_by_id(job_id, self)
     else:
         request = GetJobRequest(job_id=job_id)
         response = self._job_service.GetJob(request)
         return get_remote_job_from_proto(self._job_service,
                                          self._feast._extra_grpc_params,
                                          response.job)
Ejemplo n.º 3
0
 def list_jobs(self,
               include_terminated: bool,
               table_name: Optional[str] = None) -> List[SparkJob]:
     if not self._use_job_service:
         return list_jobs(include_terminated, self, table_name)
     else:
         request = ListJobsRequest(include_terminated=include_terminated,
                                   table_name=table_name)
         response = self._job_service.ListJobs(request)
         return [
             get_remote_job_from_proto(self._job_service,
                                       self._feast._extra_grpc_params, job)
             for job in response.jobs
         ]