klion26 commented on a change in pull request #11971:
URL: https://github.com/apache/flink/pull/11971#discussion_r422456361



##########
File path: docs/training/datastream_api.zh.md
##########
@@ -104,63 +99,56 @@ public class Example {
     public static void main(String[] args) throws Exception {
         final StreamExecutionEnvironment env =
                 StreamExecutionEnvironment.getExecutionEnvironment();
-
+    
         DataStream<Person> flintstones = env.fromElements(
                 new Person("Fred", 35),
                 new Person("Wilma", 35),
                 new Person("Pebbles", 2));
-
+    
         DataStream<Person> adults = flintstones.filter(new 
FilterFunction<Person>() {
             @Override
             public boolean filter(Person person) throws Exception {
                 return person.age >= 18;
             }
         });
-
+    
         adults.print();
-
+    
         env.execute();
     }
-
+    
     public static class Person {
         public String name;
         public Integer age;
         public Person() {};
-
+    
         public Person(String name, Integer age) {
             this.name = name;
             this.age = age;
         };
-
+    
         public String toString() {
             return this.name.toString() + ": age " + this.age.toString();
         };
     }
 }
 {% endhighlight %}
 
-### Stream execution environment
+### Stream 执行环境
 
-Every Flink application needs an execution environment, `env` in this example. 
Streaming
-applications need to use a `StreamExecutionEnvironment`.
+每个 Flink 应用都需要有执行环境,在该示例中为 `env` 。流式应用需要用到 `StreamExecutionEnvironment`。
 
-The DataStream API calls made in your application build a job graph that is 
attached to the
-`StreamExecutionEnvironment`. When `env.execute()` is called this graph is 
packaged up and sent to
-the Flink Master, which parallelizes the job and distributes slices of it to 
the Task Managers for
-execution. Each parallel slice of your job will be executed in a *task slot*.
+DataStream API 将你的应用构建为一个由 `StreamExecutionEnvironment` 生成的 job graph。当调用 
`env.execute()` 时此 graph 就被打包并发送到 Flink Master 上,后者对作业并行处理并将其切片分发给 Task Manager 
来执行。每个作业并行切片将在 *task slot* 中执行。

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:
[email protected]


Reply via email to