accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <>
Subject [GitHub] accumulo pull request: ACCUMULO-3000: Added config option and impl...
Date Tue, 21 Apr 2015 20:24:21 GMT
Github user keith-turner commented on a diff in the pull request:
    --- Diff: minicluster/src/main/java/org/apache/accumulo/minicluster/
    @@ -108,6 +108,19 @@ public MiniAccumuloConfig setZooKeeperStartupTime(long zooKeeperStartupTime)
    +   * Configure an existing ZooKeeper instance to use. Calling this method is optional.
If not set, a new ZooKeeper instance is created.
    +   *
    +   * @param existingZooKeepers
    +   *          Connection string for a already-running ZooKeeper instance
    +   *
    +   * @since 1.7.0
    +   */
    +  public MiniAccumuloConfig setExistingZooKeepers(String existingZooKeepers) {
    --- End diff --
    > Clear it by passing null to setter. Setter should probably disallow setting an empty
    I was thinking about this some more.  I really like having a separate clear method, rather
than overloading the set method with clear functionality.  However I was trying to come up
with a better reason for a clear method, than "I like it".  
    I suspect most common use case will be to call setEZK and then run mini.  I think use
cases involviing clearEZK and getEZK will be less common.  For the use case of calling setEZK
and running mini,  passing null to setEZK is unexpected.   So accepting null in setEZK would
allow unexpected behavior for the most common use case.  Having a separate clear method avoids
this problem. 

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 or file a JIRA ticket
with INFRA.

View raw message