accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Loss (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-3382) client only connects to first zookeeper instance
Date Thu, 04 Dec 2014 18:18:12 GMT
Brian Loss created ACCUMULO-3382:
------------------------------------

             Summary: client only connects to first zookeeper instance
                 Key: ACCUMULO-3382
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3382
             Project: Accumulo
          Issue Type: Bug
          Components: client, mapreduce
    Affects Versions: 1.6.1
            Reporter: Brian Loss
            Assignee: Eric Newton


When using a ClientConfiguration (or a ZookeeperInstance) to connect to accumulo, the connection
will only ever use the first zookeeper in the list provided. When connections are made from
a mapreduce job, this can lead to the first zookeeper server becoming overloaded.

The underlying problem seems to be in ClientConfiguration:
{code:java}
ClientConfiguration cc = ClientConfiguration.loadDefault().withZkHosts("host1,host2,host3");
// Will only return "host1" and not "host1,host2,host3"
System.out.println(cc.get(ClientConfiguration.ClientProperty.INSTANCE_ZK_HOST));
{code}
This is happening because ClientConfiguration extends CompositeConfiguration, a class in commons-configuration.
On of the default features is that if you set a property that is a comma-delimited list of
values, it creates a list property. If you retrieve the property value using getString, then
only the first value in the list will be returned.

It seems there are a couple solutions to this problem:
1. Disable the automatic list parsing. This is trivial by simply calling setDelimiterParsingDisabled(true)
in the ClientConfiguration constructor.
2. Change the way all properties that are intended to be a comma-separated list are retrieved
such that the appropriate list-based retrieval method is used.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message