Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-3218

ZooKeeperInstance only uses first ZooKeeper in list of quorum

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6.0, 1.6.1
    • Fix Version/s: 1.6.2, 1.7.0
    • Component/s: client
    • Labels:
      None

      Description

      Had tests running which had a quorum of 3 ZooKeeper servers. One appears to have died and the test was then unable to connect to the Accumulo shell, hanging on trying to connect to ZooKeeper.

      There was no client.conf file present, so a ClientConfiguration was constructed from accumulo-site.xml.

      this.zooKeepers = clientConf.get(ClientProperty.INSTANCE_ZK_HOST);
      

      When the commons configuration AbstractConfiguration class is used with the get() method, only the first element in the value is returned, as the implementation treats the other items as a list because of the default separator of a comma.

      It's easily reproduced with the following:

          ZooKeeperInstance inst = new ZooKeeperInstance("accumulo", "localhost,127.0.0.1");
          System.out.println(inst.getZooKeepers());
      

      The above will print

      localhost
      

      instead of the expected

      localhost,127.0.0.1
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elserj Josh Elser
                Reporter:
                elserj Josh Elser
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m