Created
January 27, 2016 20:04
-
-
Save guobingkun/cc452bf259a1d489d717 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This interface is only used internally for discovering Druid servers in the cluster, its implementation should not | |
* involve any external announcement or discovery, and should never change the state of a Druid cluster. | |
*/ | |
public interface DruidServerDiscovery | |
{ | |
/** | |
* Find all the Druid servers that have the specified type | |
* | |
* @param type the type of Druid servers we want to find | |
* @return a list of server metadata from matched Druid servers | |
* @throws Exception | |
*/ | |
List<DruidServerMetadata> getServersForType(String type) throws Exception; | |
/** | |
* Find the Druid server that is the leader of the specified type | |
* | |
* @param type the type of the leader | |
* @return the leader's server metadata | |
* @throws Exception | |
*/ | |
DruidServerMetadata getLeaderForType(String type) throws Exception; | |
/** | |
* Find all the Druid servers that have the specified type and service name | |
* | |
* @param type the type of Druid servers we want to find | |
* @param service the service name of Druid servers we want to find. It is specified in druid.service runtime properties | |
* @return a list of server metadata from matched Druid servers | |
* @throws Exception | |
*/ | |
List<DruidServerMetadata> getServersForTypeWithService(String type, String service) throws Exception; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment