Package org.apache.hadoop.hdfs
Class DFSUtil.ServiceComparator
java.lang.Object
org.apache.hadoop.hdfs.DFSUtil.ServiceComparator
- All Implemented Interfaces:
Comparator<org.apache.hadoop.hdfs.protocol.DatanodeInfo>
- Direct Known Subclasses:
DFSUtil.StaleAndSlowComparator
- Enclosing class:
- DFSUtil
public static class DFSUtil.ServiceComparator
extends Object
implements Comparator<org.apache.hadoop.hdfs.protocol.DatanodeInfo>
Comparator for sorting DataNodeInfo[] based on
decommissioned and entering_maintenance states.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(org.apache.hadoop.hdfs.protocol.DatanodeInfo a, org.apache.hadoop.hdfs.protocol.DatanodeInfo b) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ServiceComparator
public ServiceComparator()
-
-
Method Details
-
compare
public int compare(org.apache.hadoop.hdfs.protocol.DatanodeInfo a, org.apache.hadoop.hdfs.protocol.DatanodeInfo b) - Specified by:
comparein interfaceComparator<org.apache.hadoop.hdfs.protocol.DatanodeInfo>
-