mirror of https://github.com/apache/kafka.git
MINOR: add DEFAULT_PORT for Trogdor Agent and Coordinator (#4674)
Add a DEFAULT_PORT constant for the Trogdor Agent and Coordinator. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
This commit is contained in:
parent
0c00aa0983
commit
ec9e8110e3
|
@ -44,6 +44,8 @@ import static net.sourceforge.argparse4j.impl.Arguments.store;
|
|||
public final class Agent {
|
||||
private static final Logger log = LoggerFactory.getLogger(Agent.class);
|
||||
|
||||
public static final int DEFAULT_PORT = 8888;
|
||||
|
||||
/**
|
||||
* The time at which this server was started.
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
package org.apache.kafka.trogdor.common;
|
||||
|
||||
import org.apache.kafka.trogdor.agent.Agent;
|
||||
import org.apache.kafka.trogdor.coordinator.Coordinator;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
|
@ -34,11 +37,11 @@ public interface Node {
|
|||
}
|
||||
|
||||
public static int getTrogdorAgentPort(Node node) {
|
||||
return getIntConfig(node, Platform.Config.TROGDOR_AGENT_PORT, 0);
|
||||
return getIntConfig(node, Platform.Config.TROGDOR_AGENT_PORT, Agent.DEFAULT_PORT);
|
||||
}
|
||||
|
||||
public static int getTrogdorCoordinatorPort(Node node) {
|
||||
return getIntConfig(node, Platform.Config.TROGDOR_COORDINATOR_PORT, 0);
|
||||
return getIntConfig(node, Platform.Config.TROGDOR_COORDINATOR_PORT, Coordinator.DEFAULT_PORT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ import static net.sourceforge.argparse4j.impl.Arguments.store;
|
|||
public final class Coordinator {
|
||||
private static final Logger log = LoggerFactory.getLogger(Coordinator.class);
|
||||
|
||||
public static final int DEFAULT_PORT = 8889;
|
||||
|
||||
/**
|
||||
* The start time of the Coordinator in milliseconds.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue