zhijiangW commented on a change in pull request #8608: [FLINK-11392][network] 
Introduce ShuffleEnvironment interface
URL: https://github.com/apache/flink/pull/8608#discussion_r290573784
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/ShuffleEnvironment.java
 ##########
 @@ -0,0 +1,163 @@
+/*
+ * 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.io.network;
+
+import org.apache.flink.metrics.MetricGroup;
+import org.apache.flink.runtime.deployment.InputGateDeploymentDescriptor;
+import org.apache.flink.runtime.deployment.ResultPartitionDeploymentDescriptor;
+import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
+import org.apache.flink.runtime.executiongraph.PartitionInfo;
+import org.apache.flink.runtime.io.network.api.writer.ResultPartitionWriter;
+import 
org.apache.flink.runtime.io.network.partition.PartitionProducerStateProvider;
+import org.apache.flink.runtime.io.network.partition.ResultPartitionID;
+import org.apache.flink.runtime.io.network.partition.consumer.InputGate;
+import org.apache.flink.runtime.taskexecutor.TaskExecutor;
+
+import java.io.IOException;
+import java.util.Collection;
+
+/**
+ * Interface for the implementation of shuffle service locally on task 
executor.
+ *
+ * <p>Input/Output interface of local shuffle service is based on memory 
{@link org.apache.flink.runtime.io.network.buffer.Buffer}s.
+ * The task can request next available memory buffers from created here {@link 
ResultPartitionWriter}s to write shuffle data
+ * and buffers from created here {@link InputGate}s to read it.
+ *
+ * <h2>Service lifecycle management.</h2>
+ *
+ * <p>The interface contains method's to manage the lifecycle of the local 
shuffle environment:
+ * <ol>
+ *     <li>{@code start} is called when the {@link TaskExecutor} is being 
started.</li>
+ *     <li>{@code shutdown} is called when the {@link TaskExecutor} is being 
stopped.</li>
+ * </ol>
+ *
+ * <h2>Shuffle Input/Output management.</h2>
+ *
+ * <h3>Result partition management.</h3>
+ *
+ * <p>The interface implements a factory of result partition writers for the 
task output: {@code createResultPartitionWriters}.
+ * The created writers are grouped per task and handed over to the task thread 
upon its startup.
+ * The task is responsible for the writers lifecycle from that moment.
 
 Review comment:
   writers -> writers'

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to