ChenSammi commented on code in PR #6025: URL: https://github.com/apache/ozone/pull/6025#discussion_r1457423249
########## hadoop-hdds/docs/content/feature/Topology.zh.md: ########## @@ -0,0 +1,108 @@ +--- +title: "拓扑感知能力" +weight: 2 +menu: + main: + parent: 特性 +summary: 机架感知配置可以提高读/写性能 +--- +<!--- + 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. +--> + +Ozone可以使用拓扑相关信息(例如机架位置)来优化读写管道。要获得完全的机架感知集群,Ozone需要三种不同的配置。 + + 1. 拓扑信息应由 Ozone 配置。 + 2. 当Ozone为特定管道/容器选择3个不同的数据节点时,与拓扑相关信息就会被使用.(写入) + 3. 当Ozone读取一个Key时,它应该优先从最近的节点读取。 + +<div class="alert alert-warning" role="alert"> + +Ozone 对开放式容器(写)使用 RAFT 复制,对封闭的、不可变的容器(冷数据)使用异步复制。由于RAFT需要低延迟的网络,因此只有封闭式容器才能使用拓扑感知布置。有关开放式与封闭式容器的更多信息,请参阅[容器]({{< ref "concept/Containers.md">}}) 页面。 + +</div> + +## 拓扑层次结构 + +拓扑层次结构可使用 net.topology.node.switch.mapping.impl 配置键进行配置。此配置应定义 org.apache.hadoop.net.CachedDNSToSwitchMapping 的实现。由于这是一个 Hadoop 类,因此该配置与 Hadoop 配置完全相同。 + +### 静态列表 + +静态列表可借助 ```TableMapping``` 进行配置:: + +```XML +<property> + <name>net.topology.node.switch.mapping.impl</name> + <value>org.apache.hadoop.net.TableMapping</value> +</property> +<property> + <name>net.topology.table.file.name</name> + <value>/opt/hadoop/compose/ozone-topology/network-config</value> +</property> +``` + +第二个配置选项应指向一个文本文件。文件格式为两列文本文件,各列之间用空格隔开。第一列是 IP 地址,第二列指定地址映射的机架。如果找不到与群集中主机相对应的条目,则会使用 /default-rack。 Review Comment: 群集 -> 集群 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
