cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Jirsa (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-9233) Allow system variables to be retrieved and set via CQL
Date Fri, 24 Apr 2015 00:48:38 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-9233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14510161#comment-14510161
] 

Jeff Jirsa edited comment on CASSANDRA-9233 at 4/24/15 12:47 AM:
-----------------------------------------------------------------

{noformat}
cqlsh> show VARIABLES ;

 variable                                             | value
------------------------------------------------------+-------------------------------------------------
                                        authenticator |                           AllowAllAuthenticator
                                           authorizer |                              AllowAllAuthorizer
                                        auto_snapshot |                                  
         true
                      batch_size_fail_threshold_in_kb |                                  
           50
                      batch_size_warn_threshold_in_kb |                                  
            5
                       batchlog_replay_throttle_in_kb |                                  
         1024
                         cas_contention_timeout_in_ms |                                  
         1000
                                         cluster_name |                                  
     snapshot
                              column_index_size_in_kb |                                  
           64
                                commit_failure_policy |                                  
         stop
                                  commitlog_directory |      /Users/jeff/.ccm/snapshot/node1/commitlogs
                         commitlog_segment_size_in_mb |                                  
     33554432
                                       commitlog_sync |                                  
     periodic
                          commitlog_sync_period_in_ms |                                  
        10000
                     compaction_throughput_mb_per_sec |                                  
           16
                                concurrent_compactors |                                  
            2
                            concurrent_counter_writes |                                  
           32
                                     concurrent_reads |                                  
           32
                                    concurrent_writes |                                  
           32
                            counter_cache_save_period |                                  
         7200
                             counter_cache_size_in_mb |                                  
           12
                  counter_write_request_timeout_in_ms |                                  
         5000
                                   cross_node_timeout |                                  
        false
                                  disk_failure_policy |                                  
         stop
                     dynamic_snitch_badness_threshold |                                  
          0.1
                  dynamic_snitch_reset_interval_in_ms |                                  
       600000
                 dynamic_snitch_update_interval_in_ms |                                  
          100
                                      endpoint_snitch |                                  
 SimpleSnitch
                               hinted_handoff_enabled |                                  
         true
                        hinted_handoff_throttle_in_kb |                                  
         1024
                                  incremental_backups |                                  
        false
                         index_summary_capacity_in_mb |                                  
           24
             index_summary_resize_interval_in_minutes |                                  
           60
                                        initial_token |                          [-9223372036854775808]
 inter_dc_stream_throughput_outbound_megabits_per_sec |                                  
            0
                                 inter_dc_tcp_nodelay |                                  
        false
                                internode_compression |                                  
          all
                                key_cache_save_period |                                  
        14400
                                 key_cache_size_in_mb |                                  
           24
                               key_cache_keys_to_save |                                  
   2147483647
                                       listen_address |                                  
   /127.0.0.1
                                max_hint_window_in_ms |                                  
     10800000
                           max_hints_delivery_threads |                                  
            2
                             memtable_allocation_type |                                  
 heap_buffers
                                native_transport_port |                                  
         9042
                                           num_tokens |                                  
            1
                                          partitioner |     org.apache.cassandra.dht.Murmur3Partitioner
                           permissions_validity_in_ms |                                  
         2000
                                phi_convict_threshold |                                  
          8.0
                          range_request_timeout_in_ms |                                  
        10000
                           read_request_timeout_in_ms |                                  
         5000
                                    request_scheduler |      org.apache.cassandra.scheduler.NoScheduler
                                request_timeout_in_ms |                                  
        10000
                                         role_manager |                            CassandraRoleManager
                                 roles_validity_in_ms |                                  
         2000
                               row_cache_keys_to_save |                                  
   2147483647
                                row_cache_save_period |                                  
            0
                                 row_cache_size_in_mb |                                  
            0
                                          rpc_address |                                  
   /127.0.0.1
                                        rpc_keepalive |                                  
         true
                                      rpc_min_threads |                                  
           16
                                      rpc_max_threads |                                  
   2147483647
                                             rpc_port |                                  
         9160
                          rpc_recv_buff_size_in_bytes |                                  
         null
                          rpc_send_buff_size_in_bytes |                                  
         null
                                      rpc_server_type |                                  
         sync
                                        seed_provider | org.apache.cassandra.locator.SimpleSeedProvider
                                                seeds |                                  
 [/127.0.0.1]
       server_encryption_options.internode_encryption |                                  
         none
                   server_encryption_options.protocol |                                  
          TLS
                           snapshot_before_compaction |                                  
        false
                                     ssl_storage_port |                                  
         7001
               sstable_preemptive_open_interval_in_mb |                                  
           50
                               start_native_transport |                                  
         true
                                            start_rpc |                                  
         true
                       streaming_socket_timeout_in_ms |                                  
            0
          stream_throughput_outbound_megabits_per_sec |                                  
          200
                                         storage_port |                                  
         7000
                   thrift_framed_transport_size_in_mb |                                  
           15
                          tombstone_failure_threshold |                                  
       100000
                             tombstone_warn_threshold |                                  
         1000
                                  tracetype_query_ttl |                                  
        86400
                                 tracetype_repair_ttl |                                  
       604800
                                        trickle_fsync |                                  
        false
                         trickle_fsync_interval_in_kb |                                  
        10240
                       truncate_request_timeout_in_ms |                                  
        60000
                          write_request_timeout_in_ms |                                  
         2000

cqlsh> show variable 'tombstone_failure_threshold';

 variable                    | value
-----------------------------+--------
 tombstone_failure_threshold | 100000

cqlsh> set variable 'tombstone_failure_threshold'=1000;

 variable                    | result
-----------------------------+--------
 tombstone_failure_threshold |   True

cqlsh> show variable 'tombstone_failure_threshold';

 variable                    | value
-----------------------------+-------
 tombstone_failure_threshold |  1000

cqlsh> set variable 'rpc_port'=9161;
InvalidRequest: code=2200 [Invalid query] message="Unable to change variable rpc_port to 9161
- not in list of settable variables"
{noformat}


I believe the following cassandra.yaml variables are safe to change at runtime, though I'm
going to do another pass and confirm:

{noformat}
                auto_snapshot
                batch_size_fail_threshold_in_kb
                batch_size_warn_threshold_in_kb
                batchlog_replay_throttle_in_kb
                cas_contention_timeout_in_ms
                column_index_size_in_kb
                commit_failure_policy
                commitlog_sync_period_in_ms
                compaction_throughput_mb_per_sec
                counter_cache_save_period
                counter_cache_size_in_mb
                counter_write_request_timeout_in_ms
                disk_failure_policy
                dynamic_snitch_badness_threshold
                dynamic_snitch_reset_interval_in_ms
                dynamic_snitch_update_interval_in_ms
                hinted_handoff_throttle_in_kb
                incremental_backups
                index_summary_capacity_in_mb
                index_summary_resize_interval_in_minutes
                key_cache_save_period
                key_cache_keys_to_save
                max_hint_window_in_ms
                permissions_validity_in_ms
                phi_convict_threshold
                read_request_timeout_in_ms
                request_timeout_in_ms
                roles_validity_in_ms
                row_cache_save_period
                row_cache_keys_to_save
                sstable_preemptive_open_interval_in_mb
                tombstone_failure_threshold
                tombstone_warn_threshold
                tracetype_query_ttl
                tracetype_repair_ttl
                truncate_request_timeout_in_ms
                write_request_timeout_in_ms
{noformat}

Unit tests coming in a second patch. 


was (Author: jjirsa):
{noformat}
cqlsh> show VARIABLES ;

 variable                                             | value
------------------------------------------------------+-------------------------------------------------
                                        authenticator |                           AllowAllAuthenticator
                                           authorizer |                              AllowAllAuthorizer
                                        auto_snapshot |                                  
         true
                      batch_size_fail_threshold_in_kb |                                  
           50
                      batch_size_warn_threshold_in_kb |                                  
            5
                       batchlog_replay_throttle_in_kb |                                  
         1024
                         cas_contention_timeout_in_ms |                                  
         1000
                                         cluster_name |                                  
     snapshot
                              column_index_size_in_kb |                                  
           64
                                commit_failure_policy |                                  
         stop
                                  commitlog_directory |      /Users/jeff/.ccm/snapshot/node1/commitlogs
                         commitlog_segment_size_in_mb |                                  
     33554432
                                       commitlog_sync |                                  
     periodic
                          commitlog_sync_period_in_ms |                                  
        10000
                     compaction_throughput_mb_per_sec |                                  
           16
                                concurrent_compactors |                                  
            2
                            concurrent_counter_writes |                                  
           32
                                     concurrent_reads |                                  
           32
                                    concurrent_writes |                                  
           32
                            counter_cache_save_period |                                  
         7200
                             counter_cache_size_in_mb |                                  
           12
                  counter_write_request_timeout_in_ms |                                  
         5000
                                   cross_node_timeout |                                  
        false
                                  disk_failure_policy |                                  
         stop
                     dynamic_snitch_badness_threshold |                                  
          0.1
                  dynamic_snitch_reset_interval_in_ms |                                  
       600000
                 dynamic_snitch_update_interval_in_ms |                                  
          100
                                      endpoint_snitch |                                  
 SimpleSnitch
                               hinted_handoff_enabled |                                  
         true
                        hinted_handoff_throttle_in_kb |                                  
         1024
                                  incremental_backups |                                  
        false
                         index_summary_capacity_in_mb |                                  
           24
             index_summary_resize_interval_in_minutes |                                  
           60
                                        initial_token |                          [-9223372036854775808]
 inter_dc_stream_throughput_outbound_megabits_per_sec |                                  
            0
                                 inter_dc_tcp_nodelay |                                  
        false
                                internode_compression |                                  
          all
                                key_cache_save_period |                                  
        14400
                                 key_cache_size_in_mb |                                  
           24
                               key_cache_keys_to_save |                                  
   2147483647
                                       listen_address |                                  
   /127.0.0.1
                                max_hint_window_in_ms |                                  
     10800000
                           max_hints_delivery_threads |                                  
            2
                             memtable_allocation_type |                                  
 heap_buffers
                                native_transport_port |                                  
         9042
                                           num_tokens |                                  
            1
                                          partitioner |     org.apache.cassandra.dht.Murmur3Partitioner
                           permissions_validity_in_ms |                                  
         2000
                                phi_convict_threshold |                                  
          8.0
                          range_request_timeout_in_ms |                                  
        10000
                           read_request_timeout_in_ms |                                  
         5000
                                    request_scheduler |      org.apache.cassandra.scheduler.NoScheduler
                                request_timeout_in_ms |                                  
        10000
                                         role_manager |                            CassandraRoleManager
                                 roles_validity_in_ms |                                  
         2000
                               row_cache_keys_to_save |                                  
   2147483647
                                row_cache_save_period |                                  
            0
                                 row_cache_size_in_mb |                                  
            0
                                          rpc_address |                                  
   /127.0.0.1
                                        rpc_keepalive |                                  
         true
                                      rpc_min_threads |                                  
           16
                                      rpc_max_threads |                                  
   2147483647
                                             rpc_port |                                  
         9160
                          rpc_recv_buff_size_in_bytes |                                  
         null
                          rpc_send_buff_size_in_bytes |                                  
         null
                                      rpc_server_type |                                  
         sync
                                        seed_provider | org.apache.cassandra.locator.SimpleSeedProvider
                                                seeds |                                  
 [/127.0.0.1]
       server_encryption_options.internode_encryption |                                  
         none
                   server_encryption_options.protocol |                                  
          TLS
                           snapshot_before_compaction |                                  
        false
                                     ssl_storage_port |                                  
         7001
               sstable_preemptive_open_interval_in_mb |                                  
           50
                               start_native_transport |                                  
         true
                                            start_rpc |                                  
         true
                       streaming_socket_timeout_in_ms |                                  
            0
          stream_throughput_outbound_megabits_per_sec |                                  
          200
                                         storage_port |                                  
         7000
                   thrift_framed_transport_size_in_mb |                                  
           15
                          tombstone_failure_threshold |                                  
       100000
                             tombstone_warn_threshold |                                  
         1000
                                  tracetype_query_ttl |                                  
        86400
                                 tracetype_repair_ttl |                                  
       604800
                                        trickle_fsync |                                  
        false
                         trickle_fsync_interval_in_kb |                                  
        10240
                       truncate_request_timeout_in_ms |                                  
        60000
                          write_request_timeout_in_ms |                                  
         2000

cqlsh> show variable 'tombstone_failure_threshold';

 variable                    | value
-----------------------------+--------
 tombstone_failure_threshold | 100000

cqlsh> set variable 'tombstone_failure_threshold'=1000;

 variable                    | result
-----------------------------+--------
 tombstone_failure_threshold |   True
cqlsh> show variable 'tombstone_failure_threshold';

 variable                    | value
-----------------------------+-------
 tombstone_failure_threshold |  1000
cqlsh> set variable 'rpc_port'=9161;
InvalidRequest: code=2200 [Invalid query] message="Unable to change variable rpc_port to 9161
- not in list of settable variables"
{noformat}


I believe the following cassandra.yaml variables are safe to change at runtime, though I'm
going to do another pass and confirm:

{noformat}
                auto_snapshot
                batch_size_fail_threshold_in_kb
                batch_size_warn_threshold_in_kb
                batchlog_replay_throttle_in_kb
                cas_contention_timeout_in_ms
                column_index_size_in_kb
                commit_failure_policy
                commitlog_sync_period_in_ms
                compaction_throughput_mb_per_sec
                counter_cache_save_period
                counter_cache_size_in_mb
                counter_write_request_timeout_in_ms
                disk_failure_policy
                dynamic_snitch_badness_threshold
                dynamic_snitch_reset_interval_in_ms
                dynamic_snitch_update_interval_in_ms
                hinted_handoff_throttle_in_kb
                incremental_backups
                index_summary_capacity_in_mb
                index_summary_resize_interval_in_minutes
                key_cache_save_period
                key_cache_keys_to_save
                max_hint_window_in_ms
                permissions_validity_in_ms
                phi_convict_threshold
                read_request_timeout_in_ms
                request_timeout_in_ms
                roles_validity_in_ms
                row_cache_save_period
                row_cache_keys_to_save
                sstable_preemptive_open_interval_in_mb
                tombstone_failure_threshold
                tombstone_warn_threshold
                tracetype_query_ttl
                tracetype_repair_ttl
                truncate_request_timeout_in_ms
                write_request_timeout_in_ms
{noformat}

Unit tests coming in a second patch. 

> Allow system variables to be retrieved and set via CQL
> ------------------------------------------------------
>
>                 Key: CASSANDRA-9233
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9233
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jeff Jirsa
>            Assignee: Jeff Jirsa
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: 9233.txt
>
>
> Other database systems allow system variables to be retrieved and set via their query
interface:
> https://dev.mysql.com/doc/refman/5.1/en/set-statement.html
> http://www.postgresql.org/docs/8.2/static/sql-set.html
> Proposing the following CQL syntax for retrieving variables:
> {{SHOW VARIABLES;}}
> {{SHOW VARIABLE 'variable';}}
> Proposing the following CQL syntax for setting variables:
> {{SET VARIABLE 'variable'='value' ;}}
> The output of {{SHOW VARIABLES;}} will be a superset of the actual values that can be
set with {{SET VARIABLE}}, as not all values are safe to change after starting the node. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message