Cassandra 配置组¶
Launchpad蓝图
https://blueprints.launchpad.net/trove/+spec/cassandra-configuration-groups
问题描述¶
Cassandra 数据存储当前不支持配置组。
提议的变更¶
补丁集将为 Cassandra 2.1 实现配置组。
数据库¶
无
公共 API¶
无
公共 API 安全¶
无
Python API¶
无 (合并后添加的空部分)
CLI (python-troveclient)¶
无 (合并后添加的空部分)
内部 API¶
无
Guest Agent¶
Cassandra 将其配置存储在 ‘cassandra.yaml’ 文件中(通常位于 ‘/etc/cassandra’)。为了使对配置文件所做的任何更改生效,必须重新启动节点(数据存储服务)。因此,所有配置更改都需要数据库重启,并且 ‘apply_overrides’ 将被实现为无操作。
覆盖将通过用更新的文件替换当前文件来实现。旧文件将在同一目录中备份(作为 *.old),并在配置重置时恢复。
大多数配置属性将通过配置组可用。然而,有些在 Trove 环境下没有意义。
这些包括
无关选项(例如自动快照,因为 Trove 用户无法检索它们)
guestagent 特定的选项(例如文件路径、密码)
Trove 需要控制的项目(复制/集群属性)
请参阅 可用配置属性 以获取支持的选项的完整列表。
用户应该能够将配置属性指定为标准的 Python YAML 对象 - 键值对和字典。
可用配置属性¶
未包含在列表中的属性将保留其默认值,并且不能通过 Trove 进行配置。
用户可以通过 Trove API 配置的属性
cluster_name
listen_address
commit_failure_policy
disk_failure_policy
endpoint_snitch
seed_provider
compaction_throughput_mb_per_sec
memtable_total_space_in_mb
concurrent_reads
concurrent_writes
phi_convict_threshold
commitlog_sync
commitlog_segment_size_in_mb
commitlog_total_space_in_mb
compaction_preheat_key_cache
concurrent_compactors
in_memory_compaction_limit_in_mb
preheat_kernel_page_cache
sstable_preemptive_open_interval_in_mb
memtable_allocation_type
memtable_cleanup_threshold
file_cache_size_in_mb
memtable_flush_queue_size
memtable_flush_writers
memtable_heap_space_in_mb
memtable_offheap_space_in_mb
column_index_size_in_kb
index_summary_capacity_in_mb
index_summary_resize_interval_in_minutes
reduce_cache_capacity_to
reduce_cache_sizes_at
stream_throughput_outbound_megabits_per_sec
inter_dc_stream_throughput_outbound_megabits_per_sec
trickle_fsync
trickle_fsync_interval_in_kb
auto_bootstrap
batch_size_warn_threshold_in_kb
broadcast_address
initial_token
initial_token
num_tokens
partitioner
key_cache_keys_to_save
key_cache_save_period
key_cache_size_in_mb
row_cache_keys_to_save
row_cache_size_in_mb
row_cache_save_period
memory_allocator
counter_cache_size_in_mb
counter_cache_save_period
counter_cache_keys_to_save
counter_cache_keys_to_save
tombstone_warn_threshold
tombstone_failure_threshold
range_request_timeout_in_ms
read_request_timeout_in_ms
counter_write_request_timeout_in_ms
cas_contention_timeout_in_ms
truncate_request_timeout_in_ms
write_request_timeout_in_ms
request_timeout_in_ms
cross_node_timeout
internode_send_buff_size_in_bytes
internode_recv_buff_size_in_bytes
internode_compression
inter_dc_tcp_nodelay
streaming_socket_timeout_in_ms
native_transport_max_threads
native_transport_max_frame_size_in_mb
broadcast_rpc_address
rpc_keepalive
rpc_max_threads
rpc_min_threads
rpc_recv_buff_size_in_bytes
rpc_send_buff_size_in_bytes
rpc_server_type
dynamic_snitch_badness_threshold
dynamic_snitch_reset_interval_in_ms
dynamic_snitch_update_interval_in_ms
hinted_handoff_enabled
hinted_handoff_throttle_in_kb
max_hint_window_in_ms
max_hints_delivery_threads
batchlog_replay_throttle_in_kb
request_scheduler
request_scheduler_id
request_scheduler_options
thrift_framed_transport_size_in_mb
thrift_max_message_length_in_mb
permissions_validity_in_ms
permissions_update_interval_in_ms
不可配置的属性,具有更新后的默认值
authenticator: org.apache.cassandra.auth.PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
snapshot_before_compaction: false
auto_snapshot: false
rpc_address: (由 guestagent 控制)
broadcast_rpc_address: (由 guestagent 控制)
listen_address: (由 guestagent 控制)
seed_provider.parameters.seeds: (由 guestagent 控制)
备选方案¶
无
实现¶
负责人¶
Petr Malik <pmalik@tesora.com>
里程碑¶
Liberty
工作项¶
实现处理(读/写/更新)YAML 文件的功能。
实现与配置相关的管理器 API 调用。
升级影响¶
无
依赖项¶
补丁集将在蓝图的基础上构建:cassandra-database-user-functions
测试¶
将添加单元测试以验证已实现的功能和非平凡的代码路径。
文档影响¶
数据存储文档应更新以反映启用的功能。
参考资料¶
Cassandra 2.1 文档:http://docs.datastax.com/en/cassandra/2.1/cassandra/gettingStartedCassandraIntro.html Cassandra 2.1 配置属性文档:http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configTOC.html