You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (JIRA)" <ji...@apache.org> on 2010/01/05 23:23:54 UTC

[jira] Created: (CASSANDRA-671) Config defaults behavior is inconsistent

Config defaults behavior is inconsistent
----------------------------------------

                 Key: CASSANDRA-671
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)

            Reporter: Brandon Williams
            Priority: Minor
             Fix For: 0.9


Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798818#action_12798818 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

I like that idea.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Ted Zlatanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828163#action_12828163 ] 

Ted Zlatanov commented on CASSANDRA-671:
----------------------------------------

Would it make sense to write a tool that generates/checks the configuration, whatever the backend?  It could be hooked into the Debian package and would alleviate user configuration errors.  It would generate the configuration as a data structure and then convert it to the storage backend of choice.  It would also warn and insert any missing parameters.  This would be independent of the internal Cassandra validation but maybe they can share a common definition of the parameters and their default values.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804634#action_12804634 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

ACC is solving the wrong problem.  We want to reduce the boilerplate we have in reading values from a config file, not support multiple config file formats.  ACC solves the latter but not the former.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Updated: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-671:
-------------------------------------

        Fix Version/s:     (was: 0.6)
                       0.7
    Affects Version/s:     (was: 0.7)

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798820#action_12798820 ] 

Brandon Williams commented on CASSANDRA-671:
--------------------------------------------

+1 on both yaml and Chris's suggestion

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798344#action_12798344 ] 

Hudson commented on CASSANDRA-671:
----------------------------------

Integrated in Cassandra #318 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/318/])
    make "stealth defaults" less gotcha-ful.  patch by jbellis for 


> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799399#action_12799399 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

I was wrong: YamlBeans does support java enums.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Ted Zlatanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805036#action_12805036 ] 

Ted Zlatanov commented on CASSANDRA-671:
----------------------------------------

The point is you're unhappy with XML and YAML by itself locks you into another format you may dislike later.  With ACC you can switch the format but keep the logical structure.  If you're switching anyway, why lock into another limited format?  YAML doesn't even support content encodings properly (UTF-8 and UTF-16 are de facto standards but can't be specified as with XML).  In any case, you can do a YAML backend to ACC if you must have YAML configurations.  From experience supporting YAML configurations though, I'd be wary: people see text and assume it's free-form like a normal Unix config file, so they edit and break it.

The important point is, ACC will let you enforce defaults, validate the configuration, and everything else you've listed.  Plus it supports includes, which YAML (with YamlBeans) does not.  ACC is really a configuration framework while YamlBeans is much more limited.


> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Ted Zlatanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805053#action_12805053 ] 

Ted Zlatanov commented on CASSANDRA-671:
----------------------------------------

I created CASSANDRA-743 as a wish for just the includes feature, whatever the configuration method.  Thanks.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Updated: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-671:
-------------------------------------

    Affects Version/s: 0.7

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.6
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Chris Goffinet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798815#action_12798815 ] 

Chris Goffinet commented on CASSANDRA-671:
------------------------------------------

I'd be in favor of yaml over XML. Jonathan the biggest mishap we usually see on new directives being added is we have to go through both files to check. Can I suggest that on startup we print out all the directives that are missing from config? Instead of bailing at the first one? (That way we can also show the default values). 

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805045#action_12805045 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

I understand what ACC offers.  Please stop beating the dead horse.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796887#action_12796887 ] 

Brandon Williams commented on CASSANDRA-671:
--------------------------------------------

Having been recently bitten by inadvertently using an implicit default (and also being a python guy) I agree that explicit is better.  I think the error messages when an option is not present need to be clearer for end users, however.  This is the traceback from missing DiskAccessMode:

ERROR - Exception encountered during startup.
java.lang.ExceptionInInitializerError
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:63)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:173)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Name is null
        at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:579)
        ... 2 more
Caused by: java.lang.NullPointerException: Name is null
        at java.lang.Enum.valueOf(Enum.java:213)
        at org.apache.cassandra.config.DatabaseDescriptor$DiskAccessMode.valueOf(DatabaseDescriptor.java:53)
        at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:197)
        ... 2 more
Exception encountered during startup.

Maybe some sort of config validation and no implicit defaults would be best?

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804635#action_12804635 ] 

Brandon Williams commented on CASSANDRA-671:
--------------------------------------------

-1 on ACC for the reason Jonathan outlined.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797131#action_12797131 ] 

Eric Evans commented on CASSANDRA-671:
--------------------------------------

I'm all for explicitly including all configuration directives, but I think we should be kind to upgrading users where possible (i.e. cases where an older configuration file is missing a newly added directive) and a) provide reasonable defaults, and perhaps b) log a warning (i.e. "WARNING: missing configuration directive: DiskAccessMode, (using default of "auto")).

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798813#action_12798813 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

oops, yamlbeans moved to http://code.google.com/p/yamlbeans/

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796902#action_12796902 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

if we're talking wholesale rewrite (which isn't a bad idea imo), http://jyaml.sourceforge.net/tutorial.html looks like it would require a lot less boilerplate than our current mostly-hand-rolled-xml approach.  and be a lot more human-readable too.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Ted Zlatanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804605#action_12804605 ] 

Ted Zlatanov commented on CASSANDRA-671:
----------------------------------------

I suggested this last year but haven't gotten around to producing a patch: the Apache Commons Configuration classes work well and support various data backends.  http://commons.apache.org/configuration

>From the main page:

 Configuration parameters may be loaded from the following sources:

    * Properties files
    * XML documents
    * Windows INI files
    * Property list files (plist)
    * JNDI
    * JDBC Datasource
    * System properties
    * Applet parameters
    * Servlet parameters

Different configuration sources can be mixed using a ConfigurationFactory and a CompositeConfiguration. Additional sources of configuration parameters can be created by using custom configuration objects. This customization can be achieved by extending AbstractConfiguration or AbstractFileConfiguration. 

I'd say that's substantially better than just YAML if it works.  I haven't used it with anything but Java property files and XML, though, so I'm not claiming it's a panacea.

Ted


> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.7
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798806#action_12798806 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

so if we switch formats entirely to yaml then we get to start over with "everything is explicit," right? :)

the xml is starting to damage my calm.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796877#action_12796877 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

As a Python guy at heart, I am attracted to the "explicit is better than implicit" approach and requiring all options to be present in the config file.  Is there any downside to this?

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798809#action_12798809 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

http://blog.bytemine.net/2009/12/07/yaml-in-java-and-ruby-welcome-yamlbeans suggests that yamlbeans (http://yamlbeans.sourceforge.net/) is better-maintained than jyaml. 

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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


[jira] Commented: (CASSANDRA-671) Config defaults behavior is inconsistent

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798828#action_12798828 ] 

Jonathan Ellis commented on CASSANDRA-671:
------------------------------------------

i don't think yamlbeans handles java enums.  asked on their moderated ML (http://groups.google.com/group/yamlbeans-users) to be sure.

> Config defaults behavior is inconsistent
> ----------------------------------------
>
>                 Key: CASSANDRA-671
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-671
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: debian lenny amd64 OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
>            Reporter: Brandon Williams
>            Priority: Minor
>             Fix For: 0.9
>
>
> Some configuration options when not present in the config file, such as MemtableObjectCountInMillions, will provide a default.  Others, such as DiskAccessMode will bail with a cryptic error.  Behavior amongst all the options should be consistent, and warnings should be emitted if defaults are being used.

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