YngwieWang commented on a change in pull request #9299: [FLINK-13405][docs-zh] 
Translate "Basic API Concepts" page into Chinese
URL: https://github.com/apache/flink/pull/9299#discussion_r317576784
 
 

 ##########
 File path: docs/dev/api_concepts.zh.md
 ##########
 @@ -95,31 +73,19 @@ createLocalEnvironment()
 createRemoteEnvironment(String host, int port, String... jarFiles)
 {% endhighlight %}
 
-Typically, you only need to use `getExecutionEnvironment()`, since this
-will do the right thing depending on the context: if you are executing
-your program inside an IDE or as a regular Java program it will create
-a local environment that will execute your program on your local machine. If
-you created a JAR file from your program, and invoke it through the
-[command line]({{ site.baseurl }}/ops/cli.html), the Flink cluster manager
-will execute your main method and `getExecutionEnvironment()` will return
-an execution environment for executing your program on a cluster.
+通常你只需要使用 `getExecutionEnvironment()`,因为它会根据上下文环境完成正确的工作,如果你在 IDE 中执行程序或者作为标准的 
Java 程序来执行,它会创建你的本机执行环境。如果你将程序封装成 JAR 包,然后通过[命令行]({{ site.baseurl 
}}/zh/ops/cli.html)调用,Flink 集群管理器会执行你的 main 方法并且 `getExecutionEnvironment()` 
会返回在集群上执行程序的执行环境。
 
-For specifying data sources the execution environment has several methods
-to read from files using various methods: you can just read them line by line,
-as CSV files, or using completely custom data input formats. To just read
-a text file as a sequence of lines, you can use:
+针对不同的数据源,执行环境有若干不同读取文件的方法:你可以逐行读取 CSV 文件,或者使用完全自定义的输入格式。要将文本文件作为一系列行读取,你可以使用:
 
 {% highlight java %}
 final StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
 
 DataStream<String> text = env.readTextFile("file:///path/to/file");
 {% endhighlight %}
 
-This will give you a DataStream on which you can then apply transformations to 
create new
-derived DataStreams.
+这样你会得到一个 DataStream 然后应用转换操作创建新的派生 DataStream。
 
 Review comment:
   👍 修改为“这样你会得到一个 DataStream 然后对其应用转换操作从而创建新的派生 DataStream。”

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


With regards,
Apache Git Services

Reply via email to