[jira] Commented: (CASSANDRA-1906) Sanitize configuration code
[ https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13007478#comment-13007478 ] Gary Dusbabek commented on CASSANDRA-1906: -- I can review this today. Jon-will you rebase and re-upload when you have a few minutes? 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 Attachments: 1906-2.txt, 1906.txt 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
[jira] Commented: (CASSANDRA-1906) Sanitize configuration code
[ https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13007510#comment-13007510 ] Jon Hermes commented on CASSANDRA-1906: --- Yes. If I only have to rebase this twice I'll consider it a miracle. 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 Attachments: 1906-2.txt, 1906.txt 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
[jira] Commented: (CASSANDRA-1906) Sanitize configuration code
[ https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13007678#comment-13007678 ] Gary Dusbabek commented on CASSANDRA-1906: -- Minor things (aside from the system test failures): * the CMFD constructors can be combined (public calls the private, passing nextId()). * a few of the files have spuriously inserted unnecessary imports. Those changes are the only changes for a few of them. 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 Attachments: 1906-2.txt, 1906-3.txt, 1906.txt 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
[jira] Commented: (CASSANDRA-1906) Sanitize configuration code
[ https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13004304#comment-13004304 ] Jon Hermes commented on CASSANDRA-1906: --- some notes: CASSANDRA-2007 is the majority of the first part (drop deprecated yaml config). Once that's completed, loadSchemaFromYaml() will be gutted, RawKeyspace/ColumnFamily/ColumnDefinition and schematool removed. YAML is still being used for the node config stuff, but there's much less magic there (specifically the verbose snakeYAML descriptions of config relations). We don't need schematool in trunk, but it will have to stay around in 0.7 for 0.6* upgrades. -- It doesn't look like Avro is leaving from the migration codepath, so CFMetaData will likely still have to deal with both thrift and avro objects for now. Builder pattern in CFMetaData helps gratuitously here to reduce code and confusion, and DefsTest/DD/CFS will all have to use the new construction pattern. There are two constructors: the standard one requires ks,name,type,and comparators, and all other values defaulted, private one for system CFs that set specific cfIDs, then a `CFMD foo(x) {foo=x;return this}` for each prop foo to set it other than default. Currently CFMD is mutable (and KSMD is not), so it doesn't specifically need to use a builder class to produce CFMDs. They're currently mutable because they are held in multiple places and there's a race condition when migrations come in. This should be simplified (either immutable and held in one place, or mutable with atomic references), but not for this ticket. -- For all per-node options: - Permanent changes are only made by changing the YAML. - StorageService has all the JMX calls that change DD at runtime. - To make a permanent change without restarting, change the yaml and make the temp change. The next time it starts up, it's permanent. - No thrift involved in node state. For all per-CF options: - Permanent changes must be made via migration. Thrift system_* calls, or the cli wrappers for such. - Each KSMD sits on its respective Table, each CFMD sits on its respective CFS. SST{R,W} also needs to be able to access the CFMD in a tight loop. Exposing Table (read: Keyspace) changes the MBean hierarchy, and some changes should be made there as well to make it look more like the actual relations: {noformat} o.a.c.db (tree root) / || |\ SS CM HHOM CL KEYSPACES / (I/OM) / | \ ConfigK1 K2 ... | \ / \ ... (D)EPS NodeOpts Table | / ColumnFamilies KSOpts/ | \ CF1 CF2 ... / \ ... CFS1 | /CACHES CFOpts | \ key row {noformat} - Temporary changes are made via JMX (nodetool, Table/CFS beans). They are stronger changes than new migrations coming in, so a temporary will persist until the node reboots, regardless of new migrations. To use the settings set in the most recent migration, either reboot the node or call unsetFoo() (next to getFoo() and setFoo()) for a given property. 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
[jira] Commented: (CASSANDRA-1906) Sanitize configuration code
[ https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12994565#comment-12994565 ] Jon Hermes commented on CASSANDRA-1906: --- +1, added to the list. 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
[jira] Commented: (CASSANDRA-1906) Sanitize configuration code
[ https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12993670#comment-12993670 ] Jon Hermes commented on CASSANDRA-1906: --- CFS has started to accumulate DefaultTs for settings that can be changed at runtime for per-node settings (min/max compaction threshold, and mem size/ops/time (soon row/key cache save period CASSANDRA-2100)). If we want to keep these ephemeral (non-migration) changes, then Tables (KSs) and StorageService (Global per-node settings) should follow in suit, and there should be one for every config option that doesn't impact the cluster (i.e. changing the saved_caches dir/ = Good, changing the partitioner or token ephemerally = bad). This reduces it to three paths: - Read from cassandra.yaml for SS settings at boot time, - Read from the schema and accept migrations to the schema for permanent KS/CF settings, - Change any per-node value at runtime in SS/Table/CFS, ... and the first and third may well be combined for a scant two _code_ paths (compare to current 4+ code paths) separated by the permanent/non-permanent taxonomy. 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
[jira] Commented: (CASSANDRA-1906) Sanitize configuration code
[ https://issues.apache.org/jira/browse/CASSANDRA-1906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12981978#action_12981978 ] Jon Hermes commented on CASSANDRA-1906: --- - Dropping avro (CASSANDRA-926) makes the [KS,CF,Column]Def changes much easier. I know at least CfDef will be cut in half. - If not dropping YAML entirely, then at least cleaning up the code around it and making a serious effort to use YAMLBeans (previous reverted yaml lib changes (CASSANDRA-1313) removed 100 lines of code, and YAMLBeans itself is ~10% the mass of snakeYAML) should be done. The differences between the libraries are now known. - Taking a census of all the settings knobs and sorting them into JMX vs. Thrift needs to be done to make the separation consistent, or if this isn't done, then we should have all methods available on both Thrift and JMX. In either case, the reasoning is that future methods won't have to endure an argument as to their placement; i.e. either it obviously goes in one, or necessarily goes in both. The core tenet of this improvement/ticket is making the code easier for future maintenance; the more unnecessary lines removed and the more commentary and documentation available the better. There's currently a *ton* of redundant code and deprecated flags running around in DD, the Defs, and SS, and missing a single spot of redundancy means an unusable feature (CASSANDRA-1606, CASSANDRA-1466). 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. - You can reply to this email to add a comment to the issue online.