You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Christopher Tubbs (JIRA)" <ji...@apache.org> on 2014/10/03 23:50:37 UTC

[jira] [Created] (ACCUMULO-3199) RPC options in client configuration are passed to the RPC layer poorly

Christopher Tubbs created ACCUMULO-3199:
-------------------------------------------

             Summary: RPC options in client configuration are passed to the RPC layer poorly
                 Key: ACCUMULO-3199
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3199
             Project: Accumulo
          Issue Type: Task
          Components: client
            Reporter: Christopher Tubbs
             Fix For: 1.7.0


The client configuration options for SSL, timeout, and (possibly) other RPC-related options are wrapped into an AccumuloConfiguration object to pass down to the RPC layer. This is done in a bit of a convoluted way, by leveraging the deprecated {{Instance.getConfiguration()}} method and relying on the fact that the {{Instance}} object is already passed through, instead of passing it through the {{Connector}} and internally to the the RPC layer where it's needed.

The problem with this is that only the {{ZooKeeperInstance}} holds client configuration for this purpose, and simply calling {{instance.getConfiguration()}} will not always work as expected if you don't know what kind of {{Instance}} object you have. Further, this configuration object is occasionally incorrectly used in server code to read the server-side site configuration, when {{new ServerConfigurationFactory(instance).getConfiguration()}} should be used instead. This can lead to unexpected behavior if you are relying on the {{HdfsZooInstance}} implementation to provide the site configuration, but instead you have a different {{Instance}}, because all you'll get back is the {{DefaultConfiguration}}.

The code that uses {{Instance.getConfiguration()}} needs to be changed, and the RPC-related configuration needs to be passed more explicitly through to the RPC layer, so we are less prone to bugs which make assumptions about which configuration is being retrieved with the deprecated API.



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