You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2019/07/30 18:26:49 UTC
[flink] 04/06: [hotfix] Make
TestingSlotManager#setFailUnfulfillableRequestConsumer non-nullable
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit a3ac577da3187121ba55ac246dec0dadab5a35f2
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Tue Jul 30 14:52:26 2019 +0200
[hotfix] Make TestingSlotManager#setFailUnfulfillableRequestConsumer non-nullable
---
.../resourcemanager/slotmanager/TestingSlotManager.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManager.java b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManager.java
index a07846e..a892aa1 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManager.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/TestingSlotManager.java
@@ -26,8 +26,6 @@ import org.apache.flink.runtime.resourcemanager.SlotRequest;
import org.apache.flink.runtime.resourcemanager.registration.TaskExecutorConnection;
import org.apache.flink.runtime.taskexecutor.SlotReport;
-import javax.annotation.Nullable;
-
import java.util.concurrent.Executor;
import java.util.function.Consumer;
@@ -38,7 +36,7 @@ public class TestingSlotManager implements SlotManager {
private final Consumer<Boolean> setFailUnfulfillableRequestConsumer;
- public TestingSlotManager(@Nullable Consumer<Boolean> setFailUnfulfillableRequestConsumer) {
+ TestingSlotManager(Consumer<Boolean> setFailUnfulfillableRequestConsumer) {
this.setFailUnfulfillableRequestConsumer = setFailUnfulfillableRequestConsumer;
}
@@ -83,7 +81,7 @@ public class TestingSlotManager implements SlotManager {
}
@Override
- public boolean registerSlotRequest(SlotRequest slotRequest) throws SlotManagerException {
+ public boolean registerSlotRequest(SlotRequest slotRequest) {
return false;
}
@@ -114,9 +112,7 @@ public class TestingSlotManager implements SlotManager {
@Override
public void setFailUnfulfillableRequest(boolean failUnfulfillableRequest) {
- if (setFailUnfulfillableRequestConsumer != null) {
- setFailUnfulfillableRequestConsumer.accept(failUnfulfillableRequest);
- }
+ setFailUnfulfillableRequestConsumer.accept(failUnfulfillableRequest);
}
@Override