-
Notifications
You must be signed in to change notification settings - Fork 994
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update serving service to handle new redis encoding (#1038)
* Update protos Signed-off-by: Terence <terencelimxp@gmail.com> * Add common functions Signed-off-by: Terence <terencelimxp@gmail.com> * Add serving with new encoding and IT Signed-off-by: Terence <terencelimxp@gmail.com> * Update golang protos and mocks Signed-off-by: Terence <terencelimxp@gmail.com> * Remove additional line Signed-off-by: Terence <terencelimxp@gmail.com> * Use single hmget Signed-off-by: Terence <terencelimxp@gmail.com> * Optimize redis hmget call and add maxage test Signed-off-by: Terence <terencelimxp@gmail.com> * Add redis cluster and refactor code duplication Signed-off-by: Terence <terencelimxp@gmail.com> * Attempt to fix IT port in use error Signed-off-by: Terence <terencelimxp@gmail.com> * Some cleanups Signed-off-by: Terence <terencelimxp@gmail.com> * Refactor duplicated online retriever code Signed-off-by: Terence <terencelimxp@gmail.com> * Revert accidental deletion in go.sum Signed-off-by: Terence <terencelimxp@gmail.com> * Fix test utils Signed-off-by: Terence <terencelimxp@gmail.com> * Use immutable map Signed-off-by: Terence <terencelimxp@gmail.com> * Rename redis client adapter and add more tests Signed-off-by: Terence <terencelimxp@gmail.com> * Make properties private Signed-off-by: Terence <terencelimxp@gmail.com> * Cleanup code Signed-off-by: Terence <terencelimxp@gmail.com>
- Loading branch information
1 parent
2a53800
commit 08b37c1
Showing
39 changed files
with
2,847 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
common/src/main/java/feast/common/models/FeatureTable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* 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.common.models; | ||
|
||
import feast.proto.core.FeatureTableProto.FeatureTableSpec; | ||
import feast.proto.serving.ServingAPIProto.FeatureReferenceV2; | ||
|
||
public class FeatureTable { | ||
|
||
/** | ||
* Accepts FeatureTableSpec object and returns its reference in String | ||
* "project/featuretable_name". | ||
* | ||
* @param featureTableSpec {@link FeatureTableSpec} | ||
* @return String format of FeatureTableReference | ||
*/ | ||
public static String getFeatureTableStringRef(String project, FeatureTableSpec featureTableSpec) { | ||
return String.format("%s/%s", project, featureTableSpec.getName()); | ||
} | ||
|
||
/** | ||
* Accepts FeatureReferenceV2 object and returns its reference in String | ||
* "project/featuretable_name". | ||
* | ||
* @param featureReference {@link FeatureReferenceV2} | ||
* @return String format of FeatureTableReference | ||
*/ | ||
public static String getFeatureTableStringRef( | ||
String project, FeatureReferenceV2 featureReference) { | ||
return String.format("%s/%s", project, featureReference.getFeatureTable()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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.common.models; | ||
|
||
import feast.proto.serving.ServingAPIProto.FeatureReferenceV2; | ||
|
||
public class FeatureV2 { | ||
|
||
/** | ||
* Accepts FeatureReferenceV2 object and returns its reference in String | ||
* "featuretable_name:feature_name". | ||
* | ||
* @param featureReference {@link FeatureReferenceV2} | ||
* @return String format of FeatureReferenceV2 | ||
*/ | ||
public static String getFeatureStringRef(FeatureReferenceV2 featureReference) { | ||
String ref = featureReference.getName(); | ||
if (!featureReference.getFeatureTable().isEmpty()) { | ||
ref = featureReference.getFeatureTable() + ":" + ref; | ||
} | ||
return ref; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.