flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] azagrebin commented on a change in pull request #8320: [FLINK-12201][network, metrics] Introduce InputGateWithMetrics in Task to increment numBytesIn metric
Date Wed, 29 May 2019 11:07:35 GMT
azagrebin commented on a change in pull request #8320: [FLINK-12201][network,metrics] Introduce
InputGateWithMetrics in Task to increment numBytesIn metric
URL: https://github.com/apache/flink/pull/8320#discussion_r288511454
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/io/benchmark/StreamNetworkBenchmarkEnvironment.java
 ##########
 @@ -249,18 +250,21 @@ private InputGate createInputGate(
 				channel,
 				channelDescriptors);
 
-			SingleInputGate gate = new SingleInputGateFactory(
+			final SingleInputGateFactory gateFactory = new SingleInputGateFactory(
 				environment.getConfiguration(),
 				environment.getConnectionManager(),
 				environment.getResultPartitionManager(),
 				new TaskEventDispatcher(),
-				environment.getNetworkBufferPool())
-				.create(
+				environment.getNetworkBufferPool());
+
+			final InputGate gate = new InputGateWithMetrics(
+				gateFactory.create(
 
 Review comment:
   nit: maybe have a separate variable for `gateFactory.create`
   also channel loop body could be refactored into two methods: `createInputGateDeploymentDescriptor`
and `createSingleInputGateWithMetrics` to reduce the current method

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message