Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prow/scripts/test-end-to-end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ ORIGINAL_DIR=$(pwd)
cd tests/e2e

set +e
pytest --junitxml=${LOGS_ARTIFACT_PATH}/python-sdk-test-report.xml
pytest basic-ingest-redis-serving.py --junitxml=${LOGS_ARTIFACT_PATH}/python-sdk-test-report.xml
Comment thread
zhilingc marked this conversation as resolved.
Outdated
TEST_EXIT_CODE=$?

cd ${ORIGINAL_DIR}
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/feast/core/grpc/CoreServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public void getFeastCoreVersion(
}

@Override
@Transactional
public void getFeatureSet(
GetFeatureSetRequest request, StreamObserver<GetFeatureSetResponse> responseObserver) {
try {
Expand All @@ -86,7 +85,6 @@ public void getFeatureSet(
}

@Override
@Transactional
public void listFeatureSets(
ListFeatureSetsRequest request, StreamObserver<ListFeatureSetsResponse> responseObserver) {
try {
Expand All @@ -100,7 +98,6 @@ public void listFeatureSets(
}

@Override
@Transactional
public void listStores(
ListStoresRequest request, StreamObserver<ListStoresResponse> responseObserver) {
try {
Expand All @@ -114,7 +111,6 @@ public void listStores(
}

@Override
@Transactional
public void applyFeatureSet(
ApplyFeatureSetRequest request, StreamObserver<ApplyFeatureSetResponse> responseObserver) {
try {
Expand Down Expand Up @@ -153,7 +149,6 @@ public void applyFeatureSet(
}

@Override
@Transactional
public void updateStore(
UpdateStoreRequest request, StreamObserver<UpdateStoreResponse> responseObserver) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
Expand All @@ -60,6 +61,7 @@ public JobCoordinatorService(JobInfoRepository jobInfoRepository, JobManager job
* there has been no change in the featureSet, and there is a running job for the featureSet, this
* method will do nothing.
*/
@Transactional
public JobInfo startOrUpdateJob(
List<FeatureSetSpec> featureSetSpecs, SourceProto.Source sourceSpec, StoreProto.Store store) {
Source source = Source.fromProto(sourceSpec);
Expand Down
3 changes: 3 additions & 0 deletions core/src/main/java/feast/core/service/SpecService.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
* Facilitates management of specs within the Feast registry. This includes getting existing specs
Expand Down Expand Up @@ -164,6 +165,7 @@ public ListFeatureSetsResponse listFeatureSets(ListFeatureSetsRequest.Filter fil
* @param filter filter containing the desired store name
* @return ListStoresResponse containing list of stores found matching the filter
*/
@Transactional
public ListStoresResponse listStores(ListStoresRequest.Filter filter) {
try {
String name = filter.getName();
Expand Down Expand Up @@ -241,6 +243,7 @@ public ApplyFeatureSetResponse applyFeatureSet(FeatureSetSpec newFeatureSetSpec)
* @return UpdateStoreResponse containing the new store definition
* @throws InvalidProtocolBufferException
*/
@Transactional
public UpdateStoreResponse updateStore(UpdateStoreRequest updateStoreRequest)
throws InvalidProtocolBufferException {
StoreProto.Store newStoreProto = updateStoreRequest.getStore();
Expand Down
13 changes: 10 additions & 3 deletions serving/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,18 @@
<artifactId>google-cloud-storage</artifactId>
</dependency>

<!--compileOnly 'org.projectlombok:lombok:1.18.2'-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>1.6.6</version>
<scope>provided</scope>
</dependency>


<!--testCompile "io.grpc:grpc-testing:${grpcVersion}"-->
<dependency>
Expand Down
130 changes: 120 additions & 10 deletions serving/src/main/java/feast/serving/FeastProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@
// https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-typesafe-configuration-properties

import java.util.Map;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Getter
@Setter
@ConfigurationProperties(prefix = "feast")
public class FeastProperties {
private String version;
Expand All @@ -37,27 +33,141 @@ public class FeastProperties {
private JobProperties jobs;
private TracingProperties tracing;

@Setter
@Getter
public String getVersion() {
return this.version;
}

public String getCoreHost() {
return this.coreHost;
}

public int getCoreGrpcPort() {
return this.coreGrpcPort;
}

public StoreProperties getStore() {
return this.store;
}

public JobProperties getJobs() {
return this.jobs;
}

public TracingProperties getTracing() {
return this.tracing;
}

public void setVersion(String version) {
this.version = version;
}

public void setCoreHost(String coreHost) {
this.coreHost = coreHost;
}

public void setCoreGrpcPort(int coreGrpcPort) {
this.coreGrpcPort = coreGrpcPort;
}

public void setStore(StoreProperties store) {
this.store = store;
}

public void setJobs(JobProperties jobs) {
this.jobs = jobs;
}

public void setTracing(TracingProperties tracing) {
this.tracing = tracing;
}

public static class StoreProperties {
private String configPath;
private int redisPoolMaxSize;
private int redisPoolMaxIdle;

public String getConfigPath() {
return this.configPath;
}

public int getRedisPoolMaxSize() {
return this.redisPoolMaxSize;
}

public int getRedisPoolMaxIdle() {
return this.redisPoolMaxIdle;
}

public void setConfigPath(String configPath) {
this.configPath = configPath;
}

public void setRedisPoolMaxSize(int redisPoolMaxSize) {
this.redisPoolMaxSize = redisPoolMaxSize;
}

public void setRedisPoolMaxIdle(int redisPoolMaxIdle) {
this.redisPoolMaxIdle = redisPoolMaxIdle;
}
}

@Setter
@Getter
public static class JobProperties {
private String stagingLocation;
private String storeType;
private Map<String, String> storeOptions;

public String getStagingLocation() {
return this.stagingLocation;
}

public String getStoreType() {
return this.storeType;
}

public Map<String, String> getStoreOptions() {
return this.storeOptions;
}

public void setStagingLocation(String stagingLocation) {
this.stagingLocation = stagingLocation;
}

public void setStoreType(String storeType) {
this.storeType = storeType;
}

public void setStoreOptions(Map<String, String> storeOptions) {
this.storeOptions = storeOptions;
}
}

@Setter
@Getter
public static class TracingProperties {
private boolean enabled;
private String tracerName;
private String serviceName;

public boolean isEnabled() {
return this.enabled;
}

public String getTracerName() {
return this.tracerName;
}

public String getServiceName() {
return this.serviceName;
}

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

public void setTracerName(String tracerName) {
this.tracerName = tracerName;
}

public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@
import feast.serving.service.ServingService;
import io.opentracing.Tracer;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

@Slf4j
@Configuration
public class ServingServiceConfig {

private static final Logger log = org.slf4j.LoggerFactory.getLogger(ServingServiceConfig.class);

@Bean(name = "JobStore")
public Store jobStoreDefinition(FeastProperties feastProperties) {
JobProperties jobProperties = feastProperties.getJobs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
public class SpecServiceConfig {

private static final Logger log = org.slf4j.LoggerFactory.getLogger(SpecServiceConfig.class);
private String feastCoreHost;
private int feastCorePort;
private static final int CACHE_REFRESH_RATE_MINUTES = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
import io.opentracing.Scope;
import io.opentracing.Span;
import io.opentracing.Tracer;
import lombok.extern.slf4j.Slf4j;
import org.lognet.springboot.grpc.GRpcService;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

@Slf4j
@GRpcService
public class ServingServiceGRpcController extends ServingServiceImplBase {

private static final Logger log =
org.slf4j.LoggerFactory.getLogger(ServingServiceGRpcController.class);
private final ServingService servingService;
private final String version;
private final Tracer tracer;
Expand Down
Loading