kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsiva...@apache.org
Subject [kafka] branch trunk updated: MINOR: add DEFAULT_PORT for Trogdor Agent and Coordinator (#4674)
Date Tue, 13 Mar 2018 13:15:47 GMT
This is an automated email from the ASF dual-hosted git repository.

rsivaram pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new ec9e811  MINOR: add DEFAULT_PORT for Trogdor Agent and Coordinator (#4674)
ec9e811 is described below

commit ec9e8110e3967c3ef38ed475a0cb40fc951a2aef
Author: Colin Patrick McCabe <colin@cmccabe.xyz>
AuthorDate: Tue Mar 13 06:15:44 2018 -0700

    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>
---
 tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java      | 2 ++
 tools/src/main/java/org/apache/kafka/trogdor/common/Node.java      | 7 +++++--
 .../java/org/apache/kafka/trogdor/coordinator/Coordinator.java     | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java b/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java
index 43334a1..b0fea87 100644
--- a/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java
+++ b/tools/src/main/java/org/apache/kafka/trogdor/agent/Agent.java
@@ -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.
      */
diff --git a/tools/src/main/java/org/apache/kafka/trogdor/common/Node.java b/tools/src/main/java/org/apache/kafka/trogdor/common/Node.java
index 24c8488..b0c63d8 100644
--- a/tools/src/main/java/org/apache/kafka/trogdor/common/Node.java
+++ b/tools/src/main/java/org/apache/kafka/trogdor/common/Node.java
@@ -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);
         }
     }
 
diff --git a/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java b/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java
index b2dc474..545e3a3 100644
--- a/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java
+++ b/tools/src/main/java/org/apache/kafka/trogdor/coordinator/Coordinator.java
@@ -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.
      */

-- 
To stop receiving notification emails like this one, please contact
rsivaram@apache.org.

Mime
View raw message