[
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.