|
26 | 26 | import feast.serving.ServingAPIProto.GetOnlineFeaturesResponse; |
27 | 27 |
|
28 | 28 | public interface ServingService { |
| 29 | + /** |
| 30 | + * Get information about the Feast serving deployment. |
| 31 | + * |
| 32 | + * <p>For Bigquery deployments, this includes the default job staging location to load |
| 33 | + * intermediate files to. Otherwise, this method only returns the current Feast Serving backing |
| 34 | + * store type. |
| 35 | + * |
| 36 | + * @param getFeastServingInfoRequest {@link GetFeastServingInfoRequest} |
| 37 | + * @return {@link GetFeastServingInfoResponse} |
| 38 | + */ |
29 | 39 | GetFeastServingInfoResponse getFeastServingInfo( |
30 | 40 | GetFeastServingInfoRequest getFeastServingInfoRequest); |
31 | 41 |
|
| 42 | + /** |
| 43 | + * Get features from an online serving store, given a list of {@link |
| 44 | + * feast.serving.ServingAPIProto.FeatureReference}s to retrieve, and list of {@link |
| 45 | + * feast.serving.ServingAPIProto.GetOnlineFeaturesRequest.EntityRow}s to join the retrieved values |
| 46 | + * to. |
| 47 | + * |
| 48 | + * <p>Features can be queried across feature sets, but each {@link |
| 49 | + * feast.serving.ServingAPIProto.GetOnlineFeaturesRequest.EntityRow} must contain all entities for |
| 50 | + * all feature sets included in the request. |
| 51 | + * |
| 52 | + * <p>This request is fulfilled synchronously. |
| 53 | + * |
| 54 | + * @param getFeaturesRequest {@link GetOnlineFeaturesRequest} containing list of {@link |
| 55 | + * feast.serving.ServingAPIProto.FeatureReference}s to retrieve and list of {@link |
| 56 | + * feast.serving.ServingAPIProto.GetOnlineFeaturesRequest.EntityRow}s to join the retrieved |
| 57 | + * values to. |
| 58 | + * @return {@link GetOnlineFeaturesResponse} with list of {@link |
| 59 | + * feast.serving.ServingAPIProto.GetOnlineFeaturesResponse.FieldValues} for each {@link |
| 60 | + * feast.serving.ServingAPIProto.GetOnlineFeaturesRequest.EntityRow} supplied. |
| 61 | + */ |
32 | 62 | GetOnlineFeaturesResponse getOnlineFeatures(GetOnlineFeaturesRequest getFeaturesRequest); |
33 | 63 |
|
| 64 | + /** |
| 65 | + * Get features from a batch serving store, given a list of {@link |
| 66 | + * feast.serving.ServingAPIProto.FeatureReference}s to retrieve, and {@link |
| 67 | + * feast.serving.ServingAPIProto.DatasetSource} pointing to remote location of dataset to join |
| 68 | + * retrieved features to. All columns in the provided dataset will be preserved in the output |
| 69 | + * dataset. |
| 70 | + * |
| 71 | + * <p>Due to the potential size of batch retrieval requests, this request is fulfilled |
| 72 | + * asynchronously, and returns a retrieval job id, which when supplied to {@link |
| 73 | + * #getJob(GetJobRequest)} will return the status of the retrieval job. |
| 74 | + * |
| 75 | + * @param getFeaturesRequest {@link GetBatchFeaturesRequest} containing a list of {@link |
| 76 | + * feast.serving.ServingAPIProto.FeatureReference}s to retrieve, and {@link |
| 77 | + * feast.serving.ServingAPIProto.DatasetSource} pointing to remote location of dataset to join |
| 78 | + * retrieved features to. |
| 79 | + * @return {@link GetBatchFeaturesResponse} containing reference to a retrieval {@link |
| 80 | + * feast.serving.ServingAPIProto.Job}. |
| 81 | + */ |
34 | 82 | GetBatchFeaturesResponse getBatchFeatures(GetBatchFeaturesRequest getFeaturesRequest); |
35 | 83 |
|
| 84 | + /** |
| 85 | + * Get the status of a retrieval job from a batch serving store. |
| 86 | + * |
| 87 | + * <p>The client should check the status of the returned job periodically by calling ReloadJob to |
| 88 | + * determine if the job has completed successfully or with an error. If the job completes |
| 89 | + * successfully i.e. status = JOB_STATUS_DONE with no error, then the client can check the |
| 90 | + * file_uris for the location to download feature values data. The client is assumed to have |
| 91 | + * access to these file URIs. |
| 92 | + * |
| 93 | + * <p>If an error occurred during retrieval, the {@link GetJobResponse} will also contain the |
| 94 | + * error that resulted in termination. |
| 95 | + * |
| 96 | + * @param getJobRequest {@link GetJobRequest} containing reference to a retrieval job |
| 97 | + * @return {@link GetJobResponse} |
| 98 | + */ |
36 | 99 | GetJobResponse getJob(GetJobRequest getJobRequest); |
37 | 100 | } |
0 commit comments