File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
serving/src/main/java/feast/serving/configuration/redis Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1616 */
1717package feast .serving .configuration .redis ;
1818
19+ import com .google .common .base .Enums ;
1920import feast .core .StoreProto ;
2021import feast .serving .FeastProperties ;
2122import io .lettuce .core .RedisClient ;
@@ -40,8 +41,11 @@ ClientResources jobStoreClientResources() {
4041 @ Bean (destroyMethod = "shutdown" )
4142 RedisClient jobStoreRedisClient (
4243 ClientResources jobStoreClientResources , FeastProperties feastProperties ) {
43- if (StoreProto .Store .StoreType .valueOf (feastProperties .getJobs ().getStoreType ())
44- != StoreProto .Store .StoreType .REDIS ) return null ;
44+ StoreProto .Store .StoreType storeType =
45+ Enums .getIfPresent (
46+ StoreProto .Store .StoreType .class , feastProperties .getJobs ().getStoreType ())
47+ .orNull ();
48+ if (storeType != StoreProto .Store .StoreType .REDIS ) return null ;
4549 Map <String , String > jobStoreConf = feastProperties .getJobs ().getStoreOptions ();
4650 // If job conf is empty throw StoreException
4751 if (jobStoreConf == null
You can’t perform that action at this time.
0 commit comments