You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/02 10:47:43 UTC

[GitHub] [flink] pnowojski commented on a change in pull request #13521: [FLINK-19472] Implement a one input sorting DataInput

pnowojski commented on a change in pull request #13521:
URL: https://github.com/apache/flink/pull/13521#discussion_r498748185



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java
##########
@@ -100,6 +111,27 @@ public void init() throws Exception {
 		getEnvironment().getMetricGroup().gauge(MetricNames.IO_CURRENT_INPUT_WATERMARK, this.inputWatermarkGauge::getValue);
 	}
 
+	private StreamTaskInput<IN> wrapWithSorted(StreamTaskInput<IN> input) {

Review comment:
       What about other tasks? I guess this PR is targeting just the one input? If so, maybe add `throw new UnsupportedOperationException()` in other tasks, to have a bit more "releasable master branch" while we are awaiting the follow ups?

##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java
##########
@@ -100,6 +111,27 @@ public void init() throws Exception {
 		getEnvironment().getMetricGroup().gauge(MetricNames.IO_CURRENT_INPUT_WATERMARK, this.inputWatermarkGauge::getValue);
 	}
 
+	private StreamTaskInput<IN> wrapWithSorted(StreamTaskInput<IN> input) {
+		ClassLoader userCodeClassLoader = getUserCodeClassLoader();
+		return new SortingDataInput<>(
+			input,
+			configuration.getTypeSerializerIn(input.getInputIndex(), userCodeClassLoader),
+			configuration.getStateKeySerializer(userCodeClassLoader),
+			configuration.getStatePartitioner(input.getInputIndex(), userCodeClassLoader),
+			getEnvironment().getMemoryManager(),
+			getEnvironment().getIOManager(),
+			getExecutionConfig().isObjectReuseEnabled(),
+			1.0,
+			// TODO we should get it from config somehow
+//			configuration.getManagedMemoryFractionOperatorUseCaseOfSlot(
+//				ManagedMemoryUseCase.BATCH_OP,
+//				getTaskConfiguration()
+//			),

Review comment:
       ?




----------------------------------------------------------------
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