MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CreateFeatureStore

Function CreateFeatureStore

serving/processor/storage/feature_store_mgr.cc:112–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112FeatureStore* CreateFeatureStore(ModelConfig* config) {
113 if (config->feature_store_type == "redis") {
114 LocalRedis::Config redis_config;
115 Status s = GetIPAndPortFromUrl(config->redis_url,
116 &redis_config.ip,
117 &redis_config.port);
118 if (!s.ok()) {
119 LOG(ERROR) << "Can't parse ip and port from url: "
120 << config->redis_url;
121 return nullptr;
122 }
123 redis_config.passwd = config->redis_password;
124 redis_config.db_idx = config->redis_db_idx;
125
126 return new LocalRedis(redis_config);
127 } else {
128 LOG(ERROR) << "Only LocalRedis backend now. type = "
129 << config->feature_store_type;
130 }
131
132 return nullptr;
133}
134
135#define CALL_BY_UPDATE_THREAD(fn, ...) \
136 do { \

Callers 2

AsyncFeatureStoreMgrMethod · 0.85
FeatureStoreMgrMethod · 0.85

Calls 2

GetIPAndPortFromUrlFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected