Skip to content

Commit f2c6595

Browse files
committed
Move creation of online transformation service
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
1 parent c54fbcd commit f2c6595

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

serving/src/main/java/feast/serving/config/ServingServiceConfigV2.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.google.protobuf.AbstractMessageLite;
2424
import feast.serving.registry.LocalRegistryRepo;
2525
import feast.serving.service.OnlineServingServiceV2;
26+
import feast.serving.service.OnlineTransformationService;
2627
import feast.serving.service.ServingServiceV2;
2728
import feast.serving.specs.CachedSpecService;
2829
import feast.serving.specs.CoreFeatureSpecRetriever;
@@ -127,10 +128,12 @@ public ServingServiceV2 servingServiceV2(
127128
featureSpecRetriever = new CoreFeatureSpecRetriever(specService);
128129

129130
final String transformationServiceEndpoint = feastProperties.getTransformationServiceEndpoint();
131+
final OnlineTransformationService onlineTransformationService =
132+
new OnlineTransformationService(transformationServiceEndpoint, featureSpecRetriever);
130133

131134
servingService =
132135
new OnlineServingServiceV2(
133-
retrieverV2, tracer, featureSpecRetriever, transformationServiceEndpoint);
136+
retrieverV2, tracer, featureSpecRetriever, onlineTransformationService);
134137

135138
return servingService;
136139
}
@@ -169,10 +172,12 @@ public ServingServiceV2 registryBasedServingServiceV2(
169172
featureSpecRetriever = new RegistryFeatureSpecRetriever(repo);
170173

171174
final String transformationServiceEndpoint = feastProperties.getTransformationServiceEndpoint();
175+
final OnlineTransformationService onlineTransformationService =
176+
new OnlineTransformationService(transformationServiceEndpoint, featureSpecRetriever);
172177

173178
servingService =
174179
new OnlineServingServiceV2(
175-
retrieverV2, tracer, featureSpecRetriever, transformationServiceEndpoint);
180+
retrieverV2, tracer, featureSpecRetriever, onlineTransformationService);
176181

177182
return servingService;
178183
}

serving/src/main/java/feast/serving/service/OnlineServingServiceV2.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ public OnlineServingServiceV2(
6262
OnlineRetrieverV2 retriever,
6363
Tracer tracer,
6464
FeatureSpecRetriever featureSpecRetriever,
65-
String transformationServiceEndpoint) {
65+
OnlineTransformationService onlineTransformationService) {
6666
this.retriever = retriever;
6767
this.tracer = tracer;
6868
this.featureSpecRetriever = featureSpecRetriever;
69-
this.onlineTransformationService =
70-
new OnlineTransformationService(transformationServiceEndpoint, featureSpecRetriever);
69+
this.onlineTransformationService = onlineTransformationService;
7170
}
7271

7372
/** {@inheritDoc} */

0 commit comments

Comments
 (0)