forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-7153] Introduce LocationPreferenceConstraint for scheduling
The LocationPreferenceConstraint defines whether all or any preferred locations have to be taken into consideration when scheduling tasks. Especially for batch jobs where we do lazy scheduling not all input locations might be known for a consumer task. Therefore, we set the location preference constraint to any which means that only those location are taken into consideration which are known at scheduling time. [FLINK-7153] Add test cases Replace AtomicReference with AtomicReferenceUpdater Fix Use static imports Preconditions.checkNotNull Initialize ANY array with number of returned futures Revert formatting changes in Scheduler Set flink-runtime log level in log4j-test.properties to OFF Revert changes to ExecutionVertex#getPreferredLocationsBasedOnInputs Fix failing FailoverRegionTest This closes apache#4916.
- Loading branch information
1 parent
c73b2fe
commit 3b0fb26
Showing
25 changed files
with
972 additions
and
327 deletions.
There are no files selected for viewing
152 changes: 111 additions & 41 deletions
152
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
...main/java/org/apache/flink/runtime/jobmanager/scheduler/LocationPreferenceConstraint.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,32 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* http: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 org.apache.flink.runtime.jobmanager.scheduler; | ||
|
||
/** | ||
* Defines the location preference constraint. | ||
* | ||
* <p> Currently, we support that all input locations have to be taken into consideration | ||
* and only those which are known at scheduling time. Note that if all input locations | ||
* are considered, then the scheduling operation can potentially take a while until all | ||
* inputs have locations assigned. | ||
*/ | ||
public enum LocationPreferenceConstraint { | ||
ALL, // wait for all inputs to have a location assigned | ||
ANY // only consider those inputs who already have a location assigned | ||
} |
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.