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