99 CancelJobResponse ,
1010 GetHistoricalFeaturesResponse ,
1111 GetJobResponse ,
12- Job ,
13- JobStatus ,
14- JobType ,
15- ListJobsResponse ,
1612)
13+ from feast .core .JobService_pb2 import Job as JobProto
14+ from feast .core .JobService_pb2 import JobStatus , JobType , ListJobsResponse
1715from feast .data_source import DataSource
1816from feast .pyspark .abc import (
1917 BatchIngestionJob ,
@@ -33,8 +31,8 @@ class JobServiceServicer(JobService_pb2_grpc.JobServiceServicer):
3331 def __init__ (self ):
3432 self .client = feast .Client ()
3533
36- def _job_to_proto (self , spark_job : SparkJob ) -> Job :
37- job = Job ()
34+ def _job_to_proto (self , spark_job : SparkJob ) -> JobProto :
35+ job = JobProto ()
3836 job .id = spark_job .get_id ()
3937 status = spark_job .get_status ()
4038 if status == SparkJobStatus .COMPLETED :
@@ -52,9 +50,9 @@ def _job_to_proto(self, spark_job: SparkJob) -> Job:
5250 job .type = JobType .RETRIEVAL_JOB
5351 job .retrieval .output_location = spark_job .get_output_file_uri (block = False )
5452 elif isinstance (spark_job , BatchIngestionJob ):
55- job .type = JobType .BATCH_INGESTION
53+ job .type = JobType .BATCH_INGESTION_JOB
5654 elif isinstance (spark_job , StreamIngestionJob ):
57- job .type = JobType .STREAM_INGESTION
55+ job .type = JobType .STREAM_INGESTION_JOB
5856 else :
5957 raise ValueError (f"Invalid job type { job } " )
6058
0 commit comments