PatrickRen commented on a change in pull request #11207: [FLINK-16131] [docs] Translate /opt/filesystems/s3.zh.md into Chinese URL: https://github.com/apache/flink/pull/11207#discussion_r383732964
########## File path: docs/ops/filesystems/s3.zh.md ########## @@ -23,123 +23,113 @@ specific language governing permissions and limitations under the License. --> -[Amazon Simple Storage Service](http://aws.amazon.com/s3/) (Amazon S3) provides cloud object storage for a variety of use cases. You can use S3 with Flink for **reading** and **writing data** as well in conjunction with the [streaming **state backends**]({{ site.baseurl}}/ops/state/state_backends.html). +[Amazon Simple Storage Service](http://aws.amazon.com/s3/) (Amazon S3) 提供用于多种场景的云对象存储。S3 可与 Flink 一起使用以读取、写入数据,并可与 [流的 **State backends**]({{ site.baseurl}}/ops/state/state_backends.html) 相结合使用。 * This will be replaced by the TOC {:toc} -You can use S3 objects like regular files by specifying paths in the following format: +通过以下格式指定路径,S3 对象可类似于普通文件使用: {% highlight plain %} s3://<your-bucket>/<endpoint> {% endhighlight %} -The endpoint can either be a single file or a directory, for example: +Endpoint 可以是一个文件或目录,例如: {% highlight java %} -// Read from S3 bucket +// 读取 S3 bucket env.readTextFile("s3://<bucket>/<endpoint>"); -// Write to S3 bucket +// 写入 S3 bucket stream.writeAsText("s3://<bucket>/<endpoint>"); -// Use S3 as FsStatebackend +// 使用 S3 作为 FsStatebackend env.setStateBackend(new FsStateBackend("s3://<your-bucket>/<endpoint>")); {% endhighlight %} -Note that these examples are *not* exhaustive and you can use S3 in other places as well, including your [high availability setup](../jobmanager_high_availability.html) or the [RocksDBStateBackend]({{ site.baseurl }}/ops/state/state_backends.html#the-rocksdbstatebackend); everywhere that Flink expects a FileSystem URI. +注意这些例子并*不详尽*,S3 同样可以用在其他场景,包括 [JobManager 高可用配置](../jobmanager_high_availability.html) 或 [RocksDBStateBackend]({{ site.baseurl }}/ops/state/state_backends.html#the-rocksdbstatebackend),以及所有 Flink 需要使用文件系统 URI 的位置。 -For most use cases, you may use one of our `flink-s3-fs-hadoop` and `flink-s3-fs-presto` S3 filesystem plugins which are self-contained and easy to set up. -For some cases, however, e.g., for using S3 as YARN's resource storage dir, it may be necessary to set up a specific Hadoop S3 filesystem implementation. +在大部分使用场景下,可使用 `flink-s3-fs-hadoop` 和 `flink-s3-fs-presto` 两个独立且易于设置的 S3 文件系统插件。然而在某些情况下,例如使用 S3 作为 YARN 的资源存储目录时,可能需要配置 Hadoop S3 文件系统。 Review comment: Yes you're right. I didn't see the "one of" in the English documentation. Thanks! ---------------------------------------------------------------- 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
