1+ //
2+ // Copyright 2018 The Feast Authors
3+ //
4+ // Licensed under the Apache License, Version 2.0 (the "License");
5+ // you may not use this file except in compliance with the License.
6+ // You may obtain a copy of the License at
7+ //
8+ // https://www.apache.org/licenses/LICENSE-2.0
9+ //
10+ // Unless required by applicable law or agreed to in writing, software
11+ // distributed under the License is distributed on an "AS IS" BASIS,
12+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ // See the License for the specific language governing permissions and
14+ // limitations under the License.
15+ //
16+
17+ syntax = "proto3" ;
18+ package feast_spark.api ;
19+
20+ option go_package = "github.com/feast-dev/feast-spark/sdk/go/protos/feast_spark/api" ;
21+ option java_outer_classname = "JobServiceProto" ;
22+ option java_package = "feast_spark.proto.jobservice" ;
23+
24+ import "google/protobuf/timestamp.proto" ;
25+ import "feast/core/DataSource.proto" ;
26+
27+
28+ service JobService {
29+ // Start job to ingest data from offline store into online store
30+ rpc StartOfflineToOnlineIngestionJob (StartOfflineToOnlineIngestionJobRequest ) returns (StartOfflineToOnlineIngestionJobResponse );
31+
32+ // Produce a training dataset, return a job id that will provide a file reference
33+ rpc GetHistoricalFeatures (GetHistoricalFeaturesRequest ) returns (GetHistoricalFeaturesResponse );
34+
35+ // Start job to ingest data from stream into online store
36+ rpc StartStreamToOnlineIngestionJob (StartStreamToOnlineIngestionJobRequest ) returns (StartStreamToOnlineIngestionJobResponse );
37+
38+ // List all types of jobs
39+ rpc ListJobs (ListJobsRequest ) returns (ListJobsResponse );
40+
41+ // Cancel a single job
42+ rpc CancelJob (CancelJobRequest ) returns (CancelJobResponse );
43+
44+ // Get details of a single job
45+ rpc GetJob (GetJobRequest ) returns (GetJobResponse );
46+ }
47+
48+
49+ enum JobType {
50+ INVALID_JOB = 0 ;
51+ BATCH_INGESTION_JOB = 1 ;
52+ STREAM_INGESTION_JOB = 2 ;
53+ RETRIEVAL_JOB = 4 ;
54+ }
55+
56+ enum JobStatus {
57+ JOB_STATUS_INVALID = 0 ;
58+ // The Job has be registered and waiting to get scheduled to run
59+ JOB_STATUS_PENDING = 1 ;
60+ // The Job is currently processing its task
61+ JOB_STATUS_RUNNING = 2 ;
62+ // The Job has successfully completed its task
63+ JOB_STATUS_DONE = 3 ;
64+ // The Job has encountered an error while processing its task
65+ JOB_STATUS_ERROR = 4 ;
66+ }
67+
68+ message Job {
69+ // Identifier of the Job
70+ string id = 1 ;
71+ // Type of the Job
72+ JobType type = 2 ;
73+ // Current job status
74+ JobStatus status = 3 ;
75+ // Deterministic hash of the Job
76+ string hash = 4 ;
77+ // Start time of the Job
78+ google.protobuf.Timestamp start_time = 5 ;
79+
80+ message RetrievalJobMeta {
81+ string output_location = 1 ;
82+ }
83+
84+ message OfflineToOnlineMeta {
85+ string table_name = 1 ;
86+ }
87+
88+ message StreamToOnlineMeta {
89+ string table_name = 1 ;
90+ }
91+
92+ // JobType specific metadata on the job
93+ oneof meta {
94+ RetrievalJobMeta retrieval = 6 ;
95+ OfflineToOnlineMeta batch_ingestion = 7 ;
96+ StreamToOnlineMeta stream_ingestion = 8 ;
97+ }
98+
99+ // Path to Spark job logs, if available
100+ string log_uri = 9 ;
101+ }
102+
103+ // Ingest data from offline store into online store
104+ message StartOfflineToOnlineIngestionJobRequest {
105+ // Feature table to ingest
106+ string project = 1 ;
107+ string table_name = 2 ;
108+
109+ // Start of time range for source data from offline store
110+ google.protobuf.Timestamp start_date = 3 ;
111+
112+ // End of time range for source data from offline store
113+ google.protobuf.Timestamp end_date = 4 ;
114+ }
115+
116+ message StartOfflineToOnlineIngestionJobResponse {
117+ // Job ID assigned by Feast
118+ string id = 1 ;
119+
120+ // Job start time
121+ google.protobuf.Timestamp job_start_time = 2 ;
122+
123+ // Feature table associated with the job
124+ string table_name = 3 ;
125+
126+ // Path to Spark job logs, if available
127+ string log_uri = 4 ;
128+ }
129+
130+ message GetHistoricalFeaturesRequest {
131+ // List of feature references that are being retrieved
132+ repeated string feature_refs = 1 ;
133+
134+ // Batch DataSource that can be used to obtain entity values for historical retrieval.
135+ // For each entity value, a feature value will be retrieved for that value/timestamp
136+ // Only 'BATCH_*' source types are supported.
137+ // Currently only BATCH_FILE source type is supported.
138+ feast.core.DataSource entity_source = 2 ;
139+
140+ // Optional field to specify project name override. If specified, uses the
141+ // given project for retrieval. Overrides the projects specified in
142+ // Feature References if both are specified.
143+ string project = 3 ;
144+
145+ // Specifies the path in a bucket to write the exported feature data files
146+ // Export to AWS S3 - s3://path/to/features
147+ // Export to GCP GCS - gs://path/to/features
148+ string output_location = 4 ;
149+
150+ // Specify format name for output, eg. parquet
151+ string output_format = 5 ;
152+ }
153+
154+ message GetHistoricalFeaturesResponse {
155+ // Export Job with ID assigned by Feast
156+ string id = 1 ;
157+
158+ // Uri to the join result output file
159+ string output_file_uri = 2 ;
160+
161+ // Job start time
162+ google.protobuf.Timestamp job_start_time = 3 ;
163+
164+ // Path to Spark job logs, if available
165+ string log_uri = 4 ;
166+
167+ }
168+
169+ message StartStreamToOnlineIngestionJobRequest {
170+ // Feature table to ingest
171+ string project = 1 ;
172+ string table_name = 2 ;
173+ }
174+
175+ message StartStreamToOnlineIngestionJobResponse {
176+ // Job ID assigned by Feast
177+ string id = 1 ;
178+
179+ // Job start time
180+ google.protobuf.Timestamp job_start_time = 2 ;
181+
182+ // Feature table associated with the job
183+ string table_name = 3 ;
184+
185+ // Path to Spark job logs, if available
186+ string log_uri = 4 ;
187+ }
188+
189+ message ListJobsRequest {
190+ bool include_terminated = 1 ;
191+ string table_name = 2 ;
192+ string project = 3 ;
193+ }
194+
195+ message ListJobsResponse {
196+ repeated Job jobs = 1 ;
197+ }
198+
199+ message GetJobRequest {
200+ string job_id = 1 ;
201+ }
202+
203+ message GetJobResponse {
204+ Job job = 1 ;
205+ }
206+
207+ message CancelJobRequest {
208+ string job_id = 1 ;
209+ }
210+
211+ message CancelJobResponse {}
0 commit comments