Skip to content

Commit 0bb64aa

Browse files
committed
rename things to address comments
Signed-off-by: Oleg Avdeev <oleg.v.avdeev@gmail.com>
1 parent 6e61605 commit 0bb64aa

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

protos/feast/core/JobService.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ service JobService {
4848

4949
enum JobType {
5050
INVALID_JOB = 0;
51-
BATCH_INGESTION = 1;
52-
STREAM_INGESTION = 2;
51+
BATCH_INGESTION_JOB = 1;
52+
STREAM_INGESTION_JOB = 2;
5353
RETRIEVAL_JOB = 4;
5454
}
5555

sdk/python/feast/job_service.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
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
1715
from feast.data_source import DataSource
1816
from 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

Comments
 (0)