File tree Expand file tree Collapse file tree
test/java/feast/core/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public static class JobProperties {
4545 public static class JobUpdatesProperties {
4646
4747 private long timeoutSeconds ;
48+ private long pollingIntervalMillis ;
4849 }
4950
5051 @ Getter
Original file line number Diff line number Diff line change 1616 */
1717package feast .core .service ;
1818
19+ import com .google .protobuf .InvalidProtocolBufferException ;
1920import feast .core .CoreServiceProto .ListFeatureSetsRequest ;
2021import feast .core .CoreServiceProto .ListStoresRequest .Filter ;
2122import feast .core .CoreServiceProto .ListStoresResponse ;
5354@ Service
5455public class JobCoordinatorService {
5556
56- private final long POLLING_INTERVAL_MILLISECONDS = 60000 ; // 1 min
5757 private JobRepository jobRepository ;
5858 private FeatureSetRepository featureSetRepository ;
5959 private SpecService specService ;
@@ -86,8 +86,8 @@ public JobCoordinatorService(
8686 * <p>4) Updates Feature set statuses
8787 */
8888 @ Transactional
89- @ Scheduled (fixedDelay = POLLING_INTERVAL_MILLISECONDS )
90- public void Poll () {
89+ @ Scheduled (fixedDelayString = "${feast.jobs.updates.pollingIntervalMillis}" )
90+ public void Poll () throws InvalidProtocolBufferException {
9191 log .info ("Polling for new jobs..." );
9292 List <JobUpdateTask > jobUpdateTasks = new ArrayList <>();
9393 ListStoresResponse listStoresResponse = specService .listStores (Filter .newBuilder ().build ());
Original file line number Diff line number Diff line change 3131 # Key-value dict of job options to be passed to the population jobs.
3232 options : {}
3333 updates :
34+ # Job update polling interval in milliseconds: how often Feast checks if new jobs should be sent to the runner.
35+ pollingIntervalMillis : 60000
3436 # Timeout in seconds for each attempt to update or submit a new job to the runner.
3537 timeoutSeconds : 240
3638 metrics :
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public void setUp() {
7575 }
7676
7777 @ Test
78- public void shouldDoNothingIfNoStoresFound () {
78+ public void shouldDoNothingIfNoStoresFound () throws InvalidProtocolBufferException {
7979 when (specService .listStores (any ())).thenReturn (ListStoresResponse .newBuilder ().build ());
8080 JobCoordinatorService jcs =
8181 new JobCoordinatorService (
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ feast:
120120 runner: DirectRunner
121121 options: {}
122122 updates:
123+ pollingIntervalMillis: 30000
123124 timeoutSeconds: 240
124125 metrics:
125126 enabled: false
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ feast:
103103 runner: DirectRunner
104104 options: {}
105105 updates:
106+ pollingIntervalMillis: 30000
106107 timeoutSeconds: 240
107108 metrics:
108109 enabled: false
You can’t perform that action at this time.
0 commit comments