Uses of Interface
org.apache.hadoop.net.Node
Packages that use Node
-
Uses of Node in org.apache.hadoop.net
Subinterfaces of Node in org.apache.hadoop.netClasses in org.apache.hadoop.net that implement NodeModifier and TypeClassDescriptionclassInnerNode represents a switch/router of a data center or rack.classA base class that implements interface NodeFields in org.apache.hadoop.net declared as NodeFields in org.apache.hadoop.net with type parameters of type NodeMethods in org.apache.hadoop.net with type parameters of type NodeModifier and TypeMethodDescription<T extends Node>
voidNetworkTopology.sortByDistance(Node reader, T[] nodes, int activeLen, Consumer<List<T>> secondarySort) Sort nodes array by network distance to reader with secondary sort.<T extends Node>
voidNetworkTopology.sortByDistanceUsingNetworkLocation(Node reader, T[] nodes, int activeLen, Consumer<List<T>> secondarySort) Sort nodes array by network distance to reader.Methods in org.apache.hadoop.net that return NodeModifier and TypeMethodDescriptionNetworkTopology.chooseRandom(String scope) Randomly choose a node.protected NodeNetworkTopology.chooseRandom(String scope, String excludedScope, Collection<Node> excludedNodes) NetworkTopology.chooseRandom(String scope, Collection<Node> excludedNodes) Randomly choose one node from scope.get leafIndex leaf of this subtree if it is not in the excludedNodeGiven a node's string representation, return a reference to the nodeGiven a string representation of a node, return its referenceprotected NodeNetworkTopology.getNodeForNetworkLocation(Node node) Return a reference to the node given its string representation.protected NodeNetworkTopologyWithNodeGroup.getNodeForNetworkLocation(Node node) Node.getParent()NodeBase.getParent()Methods in org.apache.hadoop.net that return types with arguments of type NodeModifier and TypeMethodDescriptionInnerNode.getChildren()InnerNodeImpl.getChildren()NetworkTopology.getDatanodesInRack(String loc) Given a string representation of a rack, return its childrenreturn leaves in scopeMethods in org.apache.hadoop.net with parameters of type NodeModifier and TypeMethodDescriptionbooleanAdd node n to the subtree of this nodebooleanvoidAdd a leaf node Update node counter & rack counter if necessaryvoidAdd a leaf node Update node counter & rack counter if necessarybooleanCheck if the tree contains node nodevoidNetworkTopology.decommissionNode(Node node) Update empty rack number when remove a node like decommission.intNetworkTopology.getDistance(Node node1, Node node2) Return the distance between two nodes It is assumed that the distance from one node to its parent is 1 The distance between two nodes is calculated by summing up their distances to their closest common ancestor.static intNetworkTopology.getDistanceByPath(Node node1, Node node2) Return the distance between two nodes by comparing their network paths without checking if they belong to the same ancestor node by reference.get leafIndex leaf of this subtree if it is not in the excludedNodeInnerNodeImpl.getNextAncestorName(Node n) protected NodeNetworkTopology.getNodeForNetworkLocation(Node node) Return a reference to the node given its string representation.protected NodeNetworkTopologyWithNodeGroup.getNodeForNetworkLocation(Node node) static StringGet the path of a nodestatic String[]NodeBase.getPathComponents(Node node) Get the path components of a node.protected intReturns an integer weight which specifies how far away {node} is away from {reader}.protected intprotected static intNetworkTopology.getWeightUsingNetworkLocation(Node reader, Node node) Returns an integer weight which specifies how far away node is from reader.booleanInnerNodeImpl.isAncestor(Node n) Judge if this node is an ancestor of node n.protected static booleanNetworkTopology.isNodeInScope(Node node, String scope) Checks whether a node belongs to the scope.booleanNetworkTopology.isOnSameNodeGroup(Node node1, Node node2) booleanNetworkTopologyWithNodeGroup.isOnSameNodeGroup(Node node1, Node node2) Check if two nodes are on the same node group (hypervisor) The assumption here is: each nodes are leaf nodes.booleanNetworkTopology.isOnSameRack(Node node1, Node node2) Check if two nodes are on the same rackbooleanNetworkTopologyWithNodeGroup.isOnSameRack(Node node1, Node node2) booleanJudge if this node is the parent of node n.protected booleanNetworkTopology.isSameParents(Node node1, Node node2) Compare the parents of each node for equalityvoidNetworkTopology.recommissionNode(Node node) Update empty rack number when add a node like recommission.booleanRemove node n from the subtree of this nodebooleanvoidRemove a node Update node counter and rack counter if necessaryvoidRemove a node Update node counter and rack counter if necessaryvoidSet this node's parentvoidSet this node's parentvoidRandomly permute the active nodes of the node array.voidNetworkTopology.sortByDistance(Node reader, Node[] nodes, int activeLen) Sort nodes array by network distance to reader.<T extends Node>
voidNetworkTopology.sortByDistance(Node reader, T[] nodes, int activeLen, Consumer<List<T>> secondarySort) Sort nodes array by network distance to reader with secondary sort.<T extends Node>
voidNetworkTopology.sortByDistance(Node reader, T[] nodes, int activeLen, Consumer<List<T>> secondarySort) Sort nodes array by network distance to reader with secondary sort.voidNetworkTopologyWithNodeGroup.sortByDistance(Node reader, Node[] nodes, int activeLen) Sort nodes array by their distances to reader.voidNetworkTopology.sortByDistanceUsingNetworkLocation(Node reader, Node[] nodes, int activeLen) Sort nodes array by network distance to reader with secondary sort.<T extends Node>
voidNetworkTopology.sortByDistanceUsingNetworkLocation(Node reader, T[] nodes, int activeLen, Consumer<List<T>> secondarySort) Sort nodes array by network distance to reader.<T extends Node>
voidNetworkTopology.sortByDistanceUsingNetworkLocation(Node reader, T[] nodes, int activeLen, Consumer<List<T>> secondarySort) Sort nodes array by network distance to reader.Method parameters in org.apache.hadoop.net with type arguments of type NodeModifier and TypeMethodDescriptionprotected NodeNetworkTopology.chooseRandom(String scope, String excludedScope, Collection<Node> excludedNodes) NetworkTopology.chooseRandom(String scope, Collection<Node> excludedNodes) Randomly choose one node from scope.intNetworkTopology.countNumOfAvailableNodes(String scope, Collection<Node> excludedNodes) return the number of leaves in scope but not in excludedNodes if scope starts with ~, return the number of nodes that are not in scope and excludedNodes;Constructors in org.apache.hadoop.net with parameters of type Node