[ 
https://issues.apache.org/jira/browse/CASSANDRA-754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Zlatanov updated CASSANDRA-754:
-----------------------------------

    Attachment: 006-CASSANDRA-754-daemonproperties.patch

This patch reorganizes the config file to have API properties.  ThriftPort, 
ThriftAddress, and ThriftFramed are gone.  Properties are set through maps that 
are passed to the daemon on startup.  The validation of the data is still done 
in DatabaseDescriptor; the mechanism for specifying the class of a 
configuration property is somewhat awkward through IPluggableAPI but I didn't 
want it to get too elaborate.  FWIW, this would have been much easier with 
Apache Commons Configuration classes.

The code in src/java/org/apache/cassandra/client/RingCache.java and 
test/unit/org/apache/cassandra/client/TestRingCache.java has TODO markers 
because it's currently incorrect.  I don't know the reason RingCache needs to 
know the current Thrift port; if the assumption is that all the nodes are 
running on the same Thrift port then it will break when one node doesn't.  If 
it's just the current Thrift server, perhaps it can iterate through 
CassandraDaemon.daemons and get the port from the ThriftDaemon if it's in 
there.  It should handle the case when the Thrift API is not used or configured.

I went with XML properties, as shown in the storage-conf.xml examples.  It 
wouldn't be hard to rework it the other way.

There's some code duplication between AvroDaemon and ThriftDaemon but I prefer 
to avoid having a parent class just to handle configuration issues.  Opinions 
are welcome.

> Pluggable API with a simple HTTP+JSON daemon
> --------------------------------------------
>
>                 Key: CASSANDRA-754
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-754
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Ted Zlatanov
>            Priority: Minor
>         Attachments: 001-CASSANDRA-754-api-reorg.patch, 
> 001-CASSANDRA-754-api-reorg.patch, 002-CASSANDRA-754-thriftdaemon.patch, 
> 002-CASSANDRA-754-thriftdaemon.patch, 003-CASSANDRA-754-configapi.patch, 
> 003-CASSANDRA-754-configapi.patch, 004-CASSANDRA-754-onedaemon.patch, 
> 005-CASSANDRA-754-avroconfig.patch, 006-CASSANDRA-754-daemonproperties.patch
>
>
> Proposal of a simple pluggable API interface with a HTTP daemon implementation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to