forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create cassandra store for registration and ingestion * Downgraded Guava to 25 * Beam 2.16 uses Cassandra 3.4.0 (So we cannot use Cassandra 4.x which shades Guava) * Cassandra 3.4.0 uses Guava version 16.0 but has a compatibility check to use a different class when we use version > 19.0. * Guava version 26 (version previously used) has breaking change to method used in compatibility check in Cassandra's dependency, hence version 25 * Using Cassandra's internal field 'writetime' to handle out of order arrivals. When older records where the primary key already exist in Cassandra are ingested, they are set as tombstones in Cassandra and ignored on retrieval. * Aware that this way of handling out of order arrival is specific to Cassandra, but until we have a general way to handle out of order arrivals we need to do it this way * Cassandra's object mapper requires stating table's name along with @table annotation * table_name is still part of CassandraConfig for use in serving module * if user registers CassandraConfig with a different table name other than "feature_store", this will throw an exception * add cassandra serving service * Abstracted OnlineServingService for common implementation of online serving stores * Complete tests remain in RedisServingServiceTest while Cassandra tests only contain basic tests for writes, and some other implementation specific to Cassandra * update documentation to reflect current API and add cassandra store to docs * add default expiration to cassandra config for when featureset does not have max age * docs update, spotless check, and bug fix on cassandra schema
- Loading branch information
Showing
41 changed files
with
2,625 additions
and
52 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
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
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
80 changes: 80 additions & 0 deletions
80
core/src/main/java/feast/core/service/JobStatusService.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,80 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* Copyright 2018-2019 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.core.service; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Slf4j | ||
@Service | ||
public class JobStatusService { | ||
// | ||
// private JobInfoRepository jobInfoRepository; | ||
// private MetricsRepository metricsRepository; | ||
// | ||
// @Autowired | ||
// public JobStatusService( | ||
// JobInfoRepository jobInfoRepository, | ||
// MetricsRepository metricsRepository) { | ||
// this.jobInfoRepository = jobInfoRepository; | ||
// this.metricsRepository = metricsRepository; | ||
// } | ||
// | ||
// /** | ||
// * Lists all jobs registered to the db, sorted by provided <code>orderBy</code> | ||
// * | ||
// * @param orderBy list order | ||
// * @return list of JobDetails | ||
// */ | ||
// @Transactional | ||
// public List<JobDetail> listJobs(Sort orderBy) { | ||
// List<JobInfo> jobs = jobInfoRepository.findAll(orderBy); | ||
// return jobs.stream().map(JobInfo::getJobDetail).collect(Collectors.toList()); | ||
// } | ||
// | ||
// /** | ||
// * Lists all jobs registered to the db, sorted chronologically by creation time | ||
// * | ||
// * @return list of JobDetails | ||
// */ | ||
// @Transactional | ||
// public List<JobDetail> listJobs() { | ||
// return listJobs(Sort.by(Sort.Direction.ASC, "created")); | ||
// } | ||
// | ||
// /** | ||
// * Gets information regarding a single job. | ||
// * | ||
// * @param id feast-internal job id | ||
// * @return JobDetail for that job | ||
// */ | ||
// @Transactional | ||
// public JobDetail getJob(String id) { | ||
// Optional<JobInfo> job = jobInfoRepository.findById(id); | ||
// if (!job.isPresent()) { | ||
// throw new RetrievalException(String.format("Unable to retrieve job with id %s", | ||
// id)); | ||
// } | ||
// JobDetail.Builder jobDetailBuilder = job.get().getJobDetail().toBuilder(); | ||
// List<Metrics> metrics = metricsRepository.findByJobInfo_Id(id); | ||
// for (Metrics metric : metrics) { | ||
// jobDetailBuilder.putMetrics(metric.getName(), metric.getValue()); | ||
// } | ||
// return jobDetailBuilder.build(); | ||
// } | ||
|
||
} |
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
Oops, something went wrong.