Skip to content

Commit 94da19e

Browse files
authored
Merge pull request #27973 from CaoDonghui123/fix3
[zh]Resync tasks files[10]
2 parents 6b7072e + df00b04 commit 94da19e

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

content/zh/docs/tasks/job/coarse-parallel-processing-work-queue.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: 使用工作队列进行粗粒度并行处理
33
min-kubernetes-server-version: v1.8
44
content_type: task
5-
weight: 30
5+
weight: 20
66
---
77

88
<!--
99
---
1010
title: Coarse Parallel Processing Using a Work Queue
1111
min-kubernetes-server-version: v1.8
1212
content_type: task
13-
weight: 30
13+
weight: 20
1414
---
1515
-->
1616

@@ -28,7 +28,7 @@ Here is an overview of the steps in this example:
2828
1. **Start a message queue service.** In this example, we use RabbitMQ, but you could use another
2929
one. In practice you would set up a message queue service once and reuse it for many jobs.
3030
1. **Create a queue, and fill it with messages.** Each message represents one task to be done. In
31-
this example, a message is just an integer that we will do a lengthy computation on.
31+
this example, a message is an integer that we will do a lengthy computation on.
3232
1. **Start a Job that works on tasks from the queue**. The Job starts several pods. Each pod takes
3333
one task from the message queue, processes it, and repeats until the end of the queue is reached.
3434
-->
@@ -63,7 +63,7 @@ non-parallel, use of [Job](/docs/concepts/jobs/run-to-completion-finite-workload
6363
<!--
6464
## Starting a message queue service
6565
66-
This example uses RabbitMQ, but it should be easy to adapt to another AMQP-type message service.
66+
This example uses RabbitMQ, however, you can adapt the example to use another AMQP-type message service.
6767
6868
In practice you could set up a message queue service once in a
6969
cluster and reuse it for many jobs, as well as for long-running services.
@@ -72,7 +72,7 @@ Start RabbitMQ as follows:
7272
-->
7373
## 启动消息队列服务
7474

75-
本例使用了 RabbitMQ,使用其他 AMQP 类型的消息服务应该比较容易
75+
本例使用了 RabbitMQ,但你可以更改该示例,使用其他 AMQP 类型的消息服务
7676

7777
在实际工作中,在集群中一次性部署某个消息队列服务,之后在很多 Job 中复用,包括需要长期运行的服务。
7878

@@ -225,17 +225,17 @@ root@temp-loe07:/#
225225

226226
<!--
227227
In the last command, the `amqp-consume` tool takes one message (`-c 1`)
228-
from the queue, and passes that message to the standard input of an arbitrary command. In this case, the program `cat` is just printing
229-
out what it gets on the standard input, and the echo is just to add a carriage
228+
from the queue, and passes that message to the standard input of an arbitrary command. In this case, the program `cat` prints out the characters read from standard input, and the echo adds a carriage
230229
return so the example is readable.
231230
-->
232231

233-
最后一个命令中, `amqp-consume` 工具从队列中取走了一个消息,并把该消息传递给了随机命令的标准输出。在这种情况下,`cat` 只会打印它从标准输入或得的内容,echo 只会添加回车符以便示例可读。
232+
最后一个命令中, `amqp-consume` 工具从队列中取走了一个消息,并把该消息传递给了随机命令的标准输出。
233+
在这种情况下,`cat` 会打印它从标准输入中读取的字符,echo 会添加回车符以便示例可读。
234234

235235
<!--
236236
## Filling the Queue with tasks
237237
238-
Now lets fill the queue with some "tasks". In our example, our tasks are just strings to be
238+
Now let's fill the queue with some "tasks". In our example, our tasks are strings to be
239239
printed.
240240
241241
In a practice, the content of the messages might be:

content/zh/docs/tasks/job/fine-parallel-processing-work-queue.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
title: 使用工作队列进行精细的并行处理
33
content_type: task
44
min-kubernetes-server-version: v1.8
5-
weight: 40
5+
weight: 30
66
---
77
<!--
88
title: Fine Parallel Processing Using a Work Queue
99
content_type: task
10-
weight: 40
10+
weight: 30
1111
min-kubernetes-server-version: v1.8
1212
-->
1313

@@ -45,10 +45,10 @@ Here is an overview of the steps in this example:
4545

4646
<!--
4747
1. **Create a queue, and fill it with messages.** Each message represents one task to be done. In
48-
this example, a message is just an integer that we will do a lengthy computation on.
48+
this example, a message is an integer that we will do a lengthy computation on.
4949
-->
5050
2. **创建一个队列,然后向其中填充消息。** 每个消息表示一个将要被处理的工作任务。
51-
在这个例子中,消息只是一个我们将用于进行长度计算的整数
51+
在这个例子中,消息是一个我们将用于进行长度计算的整数
5252

5353
<!--
5454
1. **Start a Job that works on tasks from the queue**. The Job starts several pods. Each pod takes
@@ -97,14 +97,14 @@ You could also download the following files directly:
9797
<!--
9898
## Filling the Queue with tasks
9999
100-
Now let's fill the queue with some "tasks". In our example, our tasks are just strings to be
100+
Now let's fill the queue with some "tasks". In our example, our tasks are strings to be
101101
printed.
102102
103103
Start a temporary interactive pod for running the Redis CLI.
104104
-->
105105
## 使用任务填充队列
106106

107-
现在,让我们往队列里添加一些“任务”。在这个例子中,我们的任务只是一些将被打印出来的字符串
107+
现在,让我们往队列里添加一些“任务”。在这个例子中,我们的任务是一些将被打印出来的字符串
108108

109109
启动一个临时的可交互的 pod 用于运行 Redis 命令行界面。
110110

content/zh/docs/tasks/job/parallel-processing-expansion.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: 使用展开的方式进行并行处理
33
content_type: task
44
min-kubernetes-server-version: v1.8
5-
weight: 20
5+
weight: 50
66
---
77
<!--
88
title: Parallel Processing using Expansions
99
content_type: task
1010
min-kubernetes-server-version: v1.8
11-
weight: 20
11+
weight: 50
1212
-->
1313

1414
<!-- overview -->
@@ -19,7 +19,7 @@ based on a common template. You can use this approach to process batches of work
1919
parallel.
2020
2121
For this example there are only three items: _apple_, _banana_, and _cherry_.
22-
The sample Jobs process each item simply by printing a string then pausing.
22+
The sample Jobs process each item by printing a string then pausing.
2323
2424
See [using Jobs in real workloads](#using-jobs-in-real-workloads) to learn about how
2525
this pattern fits more realistic use cases.
@@ -29,7 +29,8 @@ this pattern fits more realistic use cases.
2929
你可以用这种方法来并行执行批处理任务。
3030

3131
在本任务示例中,只有三个工作条目:_apple__banana__cherry_
32-
示例任务处理每个条目时仅仅是打印一个字符串之后结束。
32+
示例任务处理每个条目时打印一个字符串之后结束。
33+
3334
参考[在真实负载中使用 Job](#using-jobs-in-real-workloads)了解更适用于真实使用场景的模式。
3435

3536
## {{% heading "prerequisites" %}}

0 commit comments

Comments
 (0)