aloknnikhil commented on a change in pull request #9916:
URL: https://github.com/apache/kafka/pull/9916#discussion_r560385644



##########
File path: raft/src/main/java/org/apache/kafka/raft/RaftConfig.java
##########
@@ -37,49 +36,56 @@
     private static final String QUORUM_PREFIX = "quorum.";
 
     public static final String QUORUM_VOTERS_CONFIG = QUORUM_PREFIX + "voters";
-    private static final String QUORUM_VOTERS_DOC = "Map of id/endpoint 
information for " +
+    public static final String QUORUM_VOTERS_DOC = "Map of id/endpoint 
information for " +
         "the set of voters in a comma-separated list of `{id}@{host}:{port}` 
entries. " +
         "For example: `1@localhost:9092,2@localhost:9093,3@localhost:9094`";
+    public static final String DEFAULT_QUORUM_VOTERS = "";
 
     public static final String QUORUM_ELECTION_TIMEOUT_MS_CONFIG = 
QUORUM_PREFIX + "election.timeout.ms";
-    private static final String QUORUM_ELECTION_TIMEOUT_MS_DOC = "Maximum time 
in milliseconds to wait " +
+    public static final String QUORUM_ELECTION_TIMEOUT_MS_DOC = "Maximum time 
in milliseconds to wait " +
         "without being able to fetch from the leader before triggering a new 
election";
+    public static final int DEFAULT_QUORUM_ELECTION_TIMEOUT_MS = 5_000;
 
     public static final String QUORUM_FETCH_TIMEOUT_MS_CONFIG = QUORUM_PREFIX 
+ "fetch.timeout.ms";
-    private static final String QUORUM_FETCH_TIMEOUT_MS_DOC = "Maximum time 
without a successful fetch from " +
+    public static final String QUORUM_FETCH_TIMEOUT_MS_DOC = "Maximum time 
without a successful fetch from " +
         "the current leader before becoming a candidate and triggering a 
election for voters; Maximum time without " +
         "receiving fetch from a majority of the quorum before asking around to 
see if there's a new epoch for leader";
+    public static final int DEFAULT_QUORUM_FETCH_TIMEOUT_MS = 15_000;
 
     public static final String QUORUM_ELECTION_BACKOFF_MAX_MS_CONFIG = 
QUORUM_PREFIX + "election.backoff.max.ms";
-    private static final String QUORUM_ELECTION_BACKOFF_MAX_MS_DOC = "Maximum 
time in milliseconds before starting new elections. " +
+    public static final String QUORUM_ELECTION_BACKOFF_MAX_MS_DOC = "Maximum 
time in milliseconds before starting new elections. " +
         "This is used in the binary exponential backoff mechanism that helps 
prevent gridlocked elections";
+    public static final int DEFAULT_QUORUM_ELECTION_BACKOFF_MAX_MS = 5_000;
 
     public static final String QUORUM_LINGER_MS_CONFIG = QUORUM_PREFIX + 
"append.linger.ms";
-    private static final String QUORUM_LINGER_MS_DOC = "The duration in 
milliseconds that the leader will " +
+    public static final String QUORUM_LINGER_MS_DOC = "The duration in 
milliseconds that the leader will " +
         "wait for writes to accumulate before flushing them to disk.";
+    public static final int DEFAULT_QUORUM_LINGER_MS = 25;
 
-    // Package-private for testing
-    static final String QUORUM_REQUEST_TIMEOUT_MS_CONFIG = QUORUM_PREFIX +
+    public static final String QUORUM_REQUEST_TIMEOUT_MS_CONFIG = 
QUORUM_PREFIX +
         CommonClientConfigs.REQUEST_TIMEOUT_MS_CONFIG;
+    public static final String QUORUM_REQUEST_TIMEOUT_MS_DOC = 
CommonClientConfigs.REQUEST_TIMEOUT_MS_DOC;
+    public static final int DEFAULT_QUORUM_REQUEST_TIMEOUT_MS = 20_000;
 
-    // Package-private for testing
-    static final String QUORUM_RETRY_BACKOFF_MS_CONFIG = QUORUM_PREFIX +
+    public static final String QUORUM_RETRY_BACKOFF_MS_CONFIG = QUORUM_PREFIX +
         CommonClientConfigs.RETRY_BACKOFF_MS_CONFIG;
+    public static final String QUORUM_RETRY_BACKOFF_MS_DOC = 
CommonClientConfigs.RETRY_BACKOFF_MS_DOC;
+    public static final int DEFAULT_QUORUM_RETRY_BACKOFF_MS = 100;
 
     static {
         CONFIG = new ConfigDef()

Review comment:
       Right. That would be fine except that would mean the tests in the raft 
module would then have to depend on the core module to create a KafkaConfig out 
of the props. There's no circular dependency (between the raft test module and 
core), but that would mean we would introduce some sort of dependency on core 
in raft. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to