Java Code Examples for org.apache.hadoop.net.Node#equals()
The following examples show how to use
org.apache.hadoop.net.Node#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JobInProgress.java From RDFS with Apache License 2.0 | 5 votes |
private int getMatchingLevelForNodes(Node n1, Node n2) { int count = 0; do { if (n1.equals(n2)) { return count; } ++count; n1 = n1.getParent(); n2 = n2.getParent(); } while (n1 != null && n2 != null); return this.maxLevel; }
Example 2
Source File: LocalityStats.java From RDFS with Apache License 2.0 | 5 votes |
public static int getMatchingLevelForNodes(Node n1, Node n2, int maxLevel) { int count = 0; do { if (n1.equals(n2)) { return count; } ++count; n1 = n1.getParent(); n2 = n2.getParent(); } while (n1 != null && n2 != null); return maxLevel; }
Example 3
Source File: JobInProgress.java From hadoop-gpu with Apache License 2.0 | 5 votes |
private int getMatchingLevelForNodes(Node n1, Node n2) { int count = 0; do { if (n1.equals(n2)) { return count; } ++count; n1 = n1.getParent(); n2 = n2.getParent(); } while (n1 != null); return this.maxLevel; }