You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2018/04/18 11:45:14 UTC
[GitHub] flink pull request #5870: [FLINK-8967][tests] Port NetworkStackThroughputITC...
GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/5870
[FLINK-8967][tests] Port NetworkStackThroughputITCase to flip6
## What is the purpose of the change
This PR ports the `NetworkStackThroughputITCase` to flip6.
## Verifying this change
* run `NetworkStackThroughputITCase`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 8967
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5870.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5870
----
commit 01dda31208c02aa7943421838962444a81f523a4
Author: zentol <ch...@...>
Date: 2018-04-17T13:24:22Z
[FLINK-8967][tests] Port NetworkStackThroughputITCase to flip6
----
---
[GitHub] flink pull request #5870: [FLINK-8967][tests] Port NetworkStackThroughputITC...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/5870
---
[GitHub] flink pull request #5870: [FLINK-8967][tests] Port NetworkStackThroughputITC...
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/5870#discussion_r182668925
--- Diff: flink-tests/src/test/java/org/apache/flink/test/runtime/NetworkStackThroughputITCase.java ---
@@ -234,43 +232,51 @@ public void testThroughput() throws Exception {
final int numTaskManagers = parallelism / numSlotsPerTaskManager;
- final LocalFlinkMiniCluster localFlinkMiniCluster = TestBaseUtils.startCluster(
- numTaskManagers,
- numSlotsPerTaskManager,
- false,
- false,
- true);
+ final MiniClusterResource cluster = new MiniClusterResource(
+ new MiniClusterResource.MiniClusterResourceConfiguration(
+ new Configuration(),
+ numTaskManagers,
+ numSlotsPerTaskManager
+ ),
+ true
+ );
+ cluster.before();
try {
- System.out.println(Arrays.toString(p));
+ System.out.println(String.format("Running test with parameters: dataVolumeGB=%s, useForwarder=%s, isSlowSender=%s, isSlowReceiver=%s, parallelism=%s, numSlotsPerTM=%s",
+ dataVolumeGb, useForwarder, isSlowSender, isSlowReceiver, parallelism, numSlotsPerTaskManager));
testProgram(
- localFlinkMiniCluster,
+ cluster,
dataVolumeGb,
useForwarder,
isSlowSender,
isSlowReceiver,
parallelism);
} finally {
- TestBaseUtils.stopCluster(localFlinkMiniCluster, FutureUtils.toFiniteDuration(TestingUtils.TIMEOUT()));
+ cluster.after();
}
}
}
private void testProgram(
- LocalFlinkMiniCluster localFlinkMiniCluster,
+ final MiniClusterResource cluster,
final int dataVolumeGb,
final boolean useForwarder,
final boolean isSlowSender,
final boolean isSlowReceiver,
final int parallelism) throws Exception {
- JobExecutionResult jer = localFlinkMiniCluster.submitJobAndWait(
+ ClusterClient<?> client = cluster.getClusterClient();
+ client.setDetached(false);
+ client.setPrintStatusDuringExecution(false);
+
+ JobExecutionResult jer = (JobExecutionResult) client.submitJob(
createJobGraph(
dataVolumeGb,
useForwarder,
isSlowSender,
isSlowReceiver,
parallelism),
- false);
+ NetworkStackThroughputITCase.class.getClassLoader());
--- End diff --
Since this method is non-static, why not use `this.getClass().getClassLoader()`?
---
[GitHub] flink issue #5870: [FLINK-8967][tests] Port NetworkStackThroughputITCase to ...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:
https://github.com/apache/flink/pull/5870
@NicoK I've addressed your comments.
---
[GitHub] flink pull request #5870: [FLINK-8967][tests] Port NetworkStackThroughputITC...
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/5870#discussion_r182699788
--- Diff: flink-tests/src/test/java/org/apache/flink/test/runtime/NetworkStackThroughputITCase.java ---
@@ -327,7 +335,8 @@ private JobGraph createJobGraph(int dataVolumeGb, boolean useForwarder, boolean
return jobGraph;
}
- private void runAllTests() throws Exception {
+ @Test
+ public void runAllTests() throws Exception {
--- End diff --
how about having `testThroughput()` as the test and inline `runAllTests()` into `main()`?
---