Customizing Ozone network topology
Learn about how to customize the Ozone network topology.
By default, Ozone supports a three layer network topology. For example, "/rack/node", where "/", "rack", and "node" are three layers of the network topology. To customize the network topology, do the following steps:
-
Define network topology schema file:
-
Prepare an Ozone network topology schema XML file.
Ozone's default network topology schema file is network-topology-default.xml. It consists of three layers which includes Root, an InnerNode Rack, and a LeafNode.
To define a four layer network topology, see network-topology-nodegroup.xml. For example, the following sample schema file ozone-customized-network-topology.xml consists of four layers which includes ROOT, two InnerNodes dc and rack, and one Leaf node.<?xml version="1.0"?> <configuration> <layoutversion>1</layoutversion> <layers> <layer id="cluster"> <prefix></prefix> <cost>1</cost> <type>Root</type> </layer> <layer id="dc"> <prefix>dc</prefix> <cost>1</cost> <type>InnerNode</type> <default>/default-dc</default> </layer> <layer id="rack"> <prefix>rack</prefix> <cost>1</cost> <type>InnerNode</type> <default>/default-rack</default> </layer> <layer id="node"> <prefix></prefix> <cost>0</cost> <type>Leaf</type> </layer> </layers> <topology> <path>/cluster/dc/rack/node</path> <enforceprefix>false</enforceprefix> </topology> </configuration>
- After the schema file is ready, copy it to every node in the cluster, under some directory, for example, /opt/cloudera.
- Make sure that the SCM, Recon, and OM services have the permission to access the customized Ozone network topology schema file.
- Set the ozone.scm.network.topology.schema.file property to the file path of the customized Ozone network topology schema file for the SCM, Recon, and OM services.
-
Prepare an Ozone network topology schema XML file.
-
Update host’s network path.
To update the rack information of each node, see Editing rack assignments for hosts. For example, in the preceeding example four layer schema file, you can change the rack information from /rack1 to /dc1/rack1.
- Restart the SCM, Recon, and OM services.