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/02/13 15:01:38 UTC
[flink] branch master updated: [FLINK-11586][tests] Remove legacy
SlotSharingITCase
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
The following commit(s) were added to refs/heads/master by this push:
new 0325d0f [FLINK-11586][tests] Remove legacy SlotSharingITCase
0325d0f is described below
commit 0325d0f515309cae9ab93ac12df46347147db611
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Tue Feb 12 22:45:51 2019 +0100
[FLINK-11586][tests] Remove legacy SlotSharingITCase
- "support slot sharing for forward job" --> is covered by JobRecoveryITCase#testTaskFailureWithSlotSharingRecovery
- "support slot sharing for forward job" --> covered by MiniClusterITCase#testSchedulingAllAtOnce
This closes #7689.
---
.../runtime/jobmanager/SlotSharingITCase.scala | 133 ---------------------
1 file changed, 133 deletions(-)
diff --git a/flink-runtime/src/test/scala/org/apache/flink/runtime/jobmanager/SlotSharingITCase.scala b/flink-runtime/src/test/scala/org/apache/flink/runtime/jobmanager/SlotSharingITCase.scala
deleted file mode 100644
index 1c26901..0000000
--- a/flink-runtime/src/test/scala/org/apache/flink/runtime/jobmanager/SlotSharingITCase.scala
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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://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
-
-import akka.actor.ActorSystem
-import akka.testkit.{ImplicitSender, TestKit}
-import org.apache.flink.runtime.akka.ListeningBehaviour
-import org.apache.flink.runtime.io.network.partition.ResultPartitionType
-import org.apache.flink.runtime.jobgraph.{DistributionPattern, JobGraph, JobVertex}
-import org.apache.flink.runtime.jobmanager.Tasks.{AgnosticBinaryReceiver, Receiver, Sender}
-import org.apache.flink.runtime.jobmanager.scheduler.SlotSharingGroup
-import org.apache.flink.runtime.messages.JobManagerMessages.{JobResultSuccess, JobSubmitSuccess, SubmitJob}
-import org.apache.flink.runtime.testingUtils.{ScalaTestingUtils, TestingUtils}
-import org.junit.runner.RunWith
-import org.scalatest.junit.JUnitRunner
-import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike}
-
-import scala.concurrent.duration._
-
-@RunWith(classOf[JUnitRunner])
-class SlotSharingITCase(_system: ActorSystem)
- extends TestKit(_system)
- with ImplicitSender
- with WordSpecLike
- with Matchers
- with BeforeAndAfterAll
- with ScalaTestingUtils {
- def this() = this(ActorSystem("TestingActorSystem", TestingUtils.testConfig))
-
- override def afterAll(): Unit = {
- TestKit.shutdownActorSystem(system)
- }
-
- "The JobManager actor" must {
- "support slot sharing for forward job" in {
- val num_tasks = 31
-
- val sender = new JobVertex("Sender")
- val receiver = new JobVertex("Receiver")
-
- sender.setInvokableClass(classOf[Sender])
- receiver.setInvokableClass(classOf[Receiver])
-
- sender.setParallelism(num_tasks)
- receiver.setParallelism(num_tasks)
-
- receiver.connectNewDataSetAsInput(sender, DistributionPattern.POINTWISE,
- ResultPartitionType.PIPELINED)
-
- val sharingGroup = new SlotSharingGroup(sender.getID, receiver.getID)
- sender.setSlotSharingGroup(sharingGroup)
- receiver.setSlotSharingGroup(sharingGroup)
-
- val jobGraph = new JobGraph("Pointwise Job", sender, receiver)
-
- val cluster = TestingUtils.startTestingCluster(num_tasks)
- val jmGateway = cluster.getLeaderGateway(1 seconds)
-
- try {
- within(TestingUtils.TESTING_DURATION) {
- jmGateway.tell(SubmitJob(jobGraph, ListeningBehaviour.EXECUTION_RESULT), self)
- expectMsg(JobSubmitSuccess(jobGraph.getJobID))
- expectMsgType[JobResultSuccess]
-
- }
- } finally {
- cluster.stop()
- }
- }
-
- /**
- * This job runs in N slots with 2 * N senders and N receivers. Unless slot sharing is used,
- * it cannot complete.
- */
- "support jobs with two inputs and slot sharing" in {
- val num_tasks = 11
-
- val sender1 = new JobVertex("Sender1")
- val sender2 = new JobVertex("Sender2")
- val receiver = new JobVertex("Receiver")
-
- sender1.setInvokableClass(classOf[Sender])
- sender2.setInvokableClass(classOf[Sender])
- receiver.setInvokableClass(classOf[AgnosticBinaryReceiver])
-
- sender1.setParallelism(num_tasks)
- sender2.setParallelism(num_tasks)
- receiver.setParallelism(num_tasks)
-
- val sharingGroup = new SlotSharingGroup(sender1.getID, sender2.getID, receiver.getID)
- sender1.setSlotSharingGroup(sharingGroup)
- sender2.setSlotSharingGroup(sharingGroup)
- receiver.setSlotSharingGroup(sharingGroup)
-
- receiver.connectNewDataSetAsInput(sender1, DistributionPattern.POINTWISE,
- ResultPartitionType.PIPELINED)
- receiver.connectNewDataSetAsInput(sender2, DistributionPattern.ALL_TO_ALL,
- ResultPartitionType.PIPELINED)
-
- val jobGraph = new JobGraph("Bipartite job", sender1, sender2, receiver)
-
- val cluster = TestingUtils.startTestingCluster(num_tasks)
- val jmGateway = cluster.getLeaderGateway(1 seconds)
-
- try {
- within(TestingUtils.TESTING_DURATION) {
- jmGateway.tell(SubmitJob(jobGraph, ListeningBehaviour.EXECUTION_RESULT), self)
- expectMsg(JobSubmitSuccess(jobGraph.getJobID))
- expectMsgType[JobResultSuccess]
- }
- } finally {
- cluster.stop()
- }
-
- }
- }
-}