[
https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993855#comment-12993855
]
Stu Hood edited comment on CASSANDRA-1906 at 2/12/11 7:57 AM:
--------------------------------------------------------------
While you are at this, CFMetaData and co should probably be converted to the
builder pattern so that we can kill their ridiculously long constructors and
factories, which are far too easy to break. Since the object is already
immutable, we don't actually need a "builder" object per-say... just copy
methods to allow chaining like:
{noformat}CFMetaData newCf = CFMetaData.create("Keyspace", "CF")
.replicationFactor(2)
.comparator(BytesType.class)
...
{noformat}
was (Author: stuhood):
While you are at this, CFMetaData and co should probably be converted to
the builder pattern so that we can kill their ridiculously long constructors
and factories, which are far too easy to break. Since the object is already
immutable, we don't actually need a "builder" object per-say... just copy
methods to allow chaining like:
{noformat}CFMetaData.create("Keyspace", "CF")
.replicationFactor(2)
.comparator(BytesType.class)
...
{noformat}
> Sanitize configuration code
> ---------------------------
>
> Key: CASSANDRA-1906
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1906
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Jon Hermes
> Assignee: Jon Hermes
> Priority: Minor
> Fix For: 0.8
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Multipart:
> - Drop deprecated YAML config. Only config allowed is via thrift/JMX. Make
> this gratuitously easy to do with sane defaults and accepting changesets as
> opposed to full definitions.
> - Combine common code between KS/CF/ColumnDefs and between thrift/avro defs.
> - Provide an obvious and clean interface for changing settings locally versus
> globally (JMX vs. thrift). Dox here.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira