huxixiang commented on a change in pull request #16547:
URL: https://github.com/apache/flink/pull/16547#discussion_r680776094



##########
File path: docs/content.zh/docs/connectors/datastream/elasticsearch.md
##########
@@ -276,81 +270,65 @@ esSinkBuilder.setRestClientFactory(new RestClientFactory {
   }
 })
 
-// finally, build and add the sink to the job's pipeline
+// 最后,构建并添加 sink 到作业管道中
 input.addSink(esSinkBuilder.build)
 ```
 {{< /tab >}}
 {{< /tabs >}}
 
-For Elasticsearch versions that still uses the now deprecated 
`TransportClient` to communicate
-with the Elasticsearch cluster (i.e., versions equal or below 5.x), note how a 
`Map` of `String`s
-is used to configure the `ElasticsearchSink`. This config map will be directly
-forwarded when creating the internally used `TransportClient`.
-The configuration keys are documented in the Elasticsearch documentation
-[here](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html).
-Especially important is the `cluster.name` parameter that must correspond to
-the name of your cluster.
+对于仍然使用已被弃用的 `TransportClient` 和 Elasticsearch 集群通信的 Elasticsearch 版本 (即,小于或等于 
5.x 的版本),
+请注意如何使用一个 `String` 类型的 `Map` 配置 `ElasticsearchSink`。在创建内部使用的 `TransportClient` 
时将直接转发此配置映射。
+配置项参见[此处](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)的
 Elasticsearch 文档中。
+特别重要的是参数 `cluster.name` 必须和你的集群名称对应上。
 
-For Elasticsearch 6.x and above, internally, the `RestHighLevelClient` is used 
for cluster communication.
-By default, the connector uses the default configurations for the REST client. 
To have custom
-configuration for the REST client, users can provide a `RestClientFactory` 
implementation when 
-setting up the `ElasticsearchClient.Builder` that builds the sink.
+对于 Elasticsearch 6.x 及以上版本,内部使用 `RestHighLevelClient` 和集群通信。
+默认情况下,连接器使用 REST 客户端的默认配置。
+如果要使用自定义配置的 REST 客户端,用户可以在设置构建 sink 的 `ElasticsearchClient.Builder` 时提供一个 
`RestClientFactory` 的实现。
 
-Also note that the example only demonstrates performing a single index
-request for each incoming element. Generally, the `ElasticsearchSinkFunction`
-can be used to perform multiple requests of different types (ex.,
-`DeleteRequest`, `UpdateRequest`, etc.). 
+另外注意,该示例仅演示了对每个传入的元素执行单个索引请求。
+通常,`ElasticsearchSinkFunction` 可用于执行多个不同类型的请求(例如 `DeleteRequest`、 
`UpdateRequest` 等)。
 
-Internally, each parallel instance of the Flink Elasticsearch Sink uses
-a `BulkProcessor` to send action requests to the cluster.
-This will buffer elements before sending them in bulk to the cluster. The 
`BulkProcessor`
-executes bulk requests one at a time, i.e. there will be no two concurrent
-flushes of the buffered actions in progress.
+在内部,Flink Elasticsearch Sink 的每个并行实例使用一个 `BulkProcessor` 向集群发送操作请求。
+这将使得元素在发送到集群之前进行批量缓存。

Review comment:
       Accepted, 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to