Class DrillRoot.DrillbitInfo
java.lang.Object
org.apache.drill.exec.server.rest.DrillRoot.DrillbitInfo
- All Implemented Interfaces:
Comparable<DrillRoot.DrillbitInfo>
- Enclosing class:
- DrillRoot
public static class DrillRoot.DrillbitInfo
extends Object
implements Comparable<DrillRoot.DrillbitInfo>
-
Constructor Summary
ConstructorDescriptionDrillbitInfo
(CoordinationProtos.DrillbitEndpoint drillbit, boolean current, boolean versionMatch) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(DrillRoot.DrillbitInfo drillbitToCompare) Method used to sort Drillbits.getState()
boolean
boolean
-
Constructor Details
-
DrillbitInfo
public DrillbitInfo(CoordinationProtos.DrillbitEndpoint drillbit, boolean current, boolean versionMatch)
-
-
Method Details
-
getAddress
-
getHttpPort
-
getUserPort
-
getControlPort
-
getDataPort
-
getVersion
-
isCurrent
public boolean isCurrent() -
isVersionMatch
public boolean isVersionMatch() -
getState
-
compareTo
Method used to sort Drillbits. Current Drillbit goes first. Then Drillbits with matching versions, after them Drillbits with mismatching versions. Matching Drillbits are sorted according address natural order, mismatching Drillbits are sorted according version, address natural order.- Specified by:
compareTo
in interfaceComparable<DrillRoot.DrillbitInfo>
- Parameters:
drillbitToCompare
- Drillbit to compare against- Returns:
- -1 if Drillbit should be before, 1 if after in list
-