You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/04/21 21:40:38 UTC

[GitHub] [hadoop-ozone] smengcl commented on a change in pull request #797: HDDS-2811. recipe/SparkOzoneFSK8s.md translation

smengcl commented on a change in pull request #797:
URL: https://github.com/apache/hadoop-ozone/pull/797#discussion_r412504182



##########
File path: hadoop-hdds/docs/content/recipe/SparkOzoneFSK8S.zh.md
##########
@@ -0,0 +1,185 @@
+---
+title: Kubernetes 上运行 Spark 和 OzoneFS
+linktitle: Spark
+summary: 如何在 K8s 上通过 Apache Spark 使用 Ozone ?
+---
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+本页介绍如何通过以下组件在 Spark 中使用 Ozone  对象存储:

Review comment:
       Remove one space after `Ozone`. 

##########
File path: hadoop-hdds/docs/content/recipe/SparkOzoneFSK8S.zh.md
##########
@@ -0,0 +1,185 @@
+---
+title: Kubernetes 上运行 Spark 和 OzoneFS
+linktitle: Spark
+summary: 如何在 K8s 上通过 Apache Spark 使用 Ozone ?
+---
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+本页介绍如何通过以下组件在 Spark 中使用 Ozone  对象存储:
+
+ - OzoneFS (兼容  Hadoop 的文件系统)

Review comment:
       Remove one space after `兼容`.

##########
File path: hadoop-hdds/docs/content/recipe/SparkOzoneFSK8S.zh.md
##########
@@ -0,0 +1,185 @@
+---
+title: Kubernetes 上运行 Spark 和 OzoneFS
+linktitle: Spark
+summary: 如何在 K8s 上通过 Apache Spark 使用 Ozone ?
+---
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+本页介绍如何通过以下组件在 Spark 中使用 Ozone  对象存储:
+
+ - OzoneFS (兼容  Hadoop 的文件系统)
+ - Hadoop 2.7 (包含在 Spark 发行包中)
+ - Kubernetes 的 Spark 调度器
+ - 本地 Spark 客户端
+
+
+## 准备
+
+下载 Spark 和 Ozone 的最新发行包并解压,本方法使用 `spark-2.4.0-bin-hadoop2.7` 进行了测试。
+
+你还需要准备以下内容:
+
+ * 用来上传下载 spark+ozone 镜像的仓库(本文档中使用 Docker Hub)
+ * 自定义镜像的名称,形如 repo/name(本文档中使用 _myrepo/ozone-spark_)
+ * 专门的 Kubernetes 命名空间(本文档中使用 _yournamespace_)
+
+## 为 driver 创建 docker 镜像
+
+### 创建 Spark driver/executor 基础镜像
+
+首先使用 Spark 的镜像创建工具创建一个镜像。
+在 Spark 发行包中运行以下命令:
+
+```bash
+./bin/docker-image-tool.sh -r myrepo -t 2.4.0 build
+```
+
+_注意_: 如果你使用 Minikube,需要加上 `-m` 参数来使用 Minikube 镜像的 docker 进程。
+
+```bash
+./bin/docker-image-tool.sh -m -r myrepo -t 2.4.0 build
+```
+
+`./bin/docker-image-tool.sh` 是 Spark 用来创建镜像的官方工具,上面的步骤会创建多个名为 _myrepo/spark_ 的 Spark 镜像,其中的第一个镜像用作接下来步骤的基础镜像。
+
+### 定制镜像
+
+创建一个用于定制镜像的目录。
+
+从集群中拷贝 `ozone-site.xml`:
+
+```bash
+kubectl cp om-0:/opt/hadoop/etc/hadoop/ozone-site.xml .
+```
+
+然后对它进行定制:

Review comment:
       Original text:
   
   > And create a custom `core-site.xml`.
   
   It refers to `core-site.xml`, not `ozone-site.xml` below.
   
   Suggestion:
   
   > 然后创建 `core-site.xml`:




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org