-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathTransformationService.java
More file actions
68 lines (63 loc) · 2.86 KB
/
Copy pathTransformationService.java
File metadata and controls
68 lines (63 loc) · 2.86 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
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright 2018-2020 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.
*/
package feast.serving.service;
import feast.proto.serving.ServingAPIProto;
import feast.proto.serving.TransformationServiceAPIProto.TransformFeaturesRequest;
import feast.proto.serving.TransformationServiceAPIProto.TransformFeaturesResponse;
import feast.proto.serving.TransformationServiceAPIProto.ValueType;
import feast.proto.types.ValueProto;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.tuple.Pair;
public interface TransformationService {
/**
* Apply on demand transformations for the specified ODFVs.
*
* @param transformFeaturesRequest proto containing the ODFV references and necessary data
* @return a proto object containing the response
*/
TransformFeaturesResponse transformFeatures(TransformFeaturesRequest transformFeaturesRequest);
/**
* Extract the list of on demand feature sources from a list of ODFV references.
*
* @param onDemandFeatureReferences list of ODFV references to be parsed
* @return list of on demand feature sources
*/
List<ServingAPIProto.FeatureReferenceV2> extractOnDemandFeaturesDependencies(
List<ServingAPIProto.FeatureReferenceV2> onDemandFeatureReferences);
/**
* Process a response from the feature transformation server by augmenting the given lists of
* field maps and status maps with the correct fields from the response.
*
* @param transformFeaturesResponse response to be processed
* @param onDemandFeatureViewName name of ODFV to which the response corresponds
* @param onDemandFeatureStringReferences set of all ODFV references that should be kept
* @param responseBuilder {@link ServingAPIProto.GetOnlineFeaturesResponse.Builder}
*/
void processTransformFeaturesResponse(
TransformFeaturesResponse transformFeaturesResponse,
String onDemandFeatureViewName,
Set<String> onDemandFeatureStringReferences,
ServingAPIProto.GetOnlineFeaturesResponse.Builder responseBuilder);
/**
* Serialize data into Arrow IPC format, to be sent to the Python feature transformation server.
*
* @param values list of field maps to be serialized
* @return the data packaged into a ValueType proto object
*/
ValueType serializeValuesIntoArrowIPC(List<Pair<String, List<ValueProto.Value>>> values);
}