Github user hsaputra commented on a diff in the pull request:

    https://github.com/apache/twill/pull/40#discussion_r107688594
  
    --- Diff: 
twill-core/src/main/java/org/apache/twill/internal/TwillRuntimeSpecification.java
 ---
    @@ -105,4 +114,17 @@ public String getRmSchedulerAddr() {
       public Map<String, Integer> getMaxRetries() {
         return maxRetries;
       }
    +
    +  /**
    +   * Returns the ZK connection string for the Kafka used for log 
collections,
    +   * or {@code null} if log collection is disabled.
    +   */
    +  @Nullable
    +  public String getKafkaZKConnect() {
    +    if (!isLogCollectionEnabled()) {
    --- End diff --
    
    Thats actually what I meant. I am wondering if we could avoid returning 
null here because the extra check of if for `isLogCollectionEnabled`. The idea 
is the code that need to get KafkaZkconnect can get it when it is needed and 
dont call it when there is no need to do Kafka connect bc the caller can call 
`isLogCollectionEnabled` to determine whether to get the connect info or not.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to