經過大量的來回(以及大量的試驗和錯誤),我終於到達了一個工作配置。我這樣做的方式是從github下載titan-cassandra 0.3.0項目,並在其中找到cassandra.yaml
。我不得不評論幾個參數,因爲titan-cassandra 0.5.4顯然不再接受它們。
它可能不完美(如果有人有進一步的建議,請告訴我),但至少它是有效的。這是一個cassandra.yaml
兼容titan-cassnadra 0.5.4。在嵌入式模式下:
# Cassandra storage config YAML
# NOTE:
# See http://wiki.apache.org/cassandra/StorageConfiguration for
# full explanations of configuration directives
# /NOTE
cluster_name: 'Test Cluster'
initial_token:
hinted_handoff_enabled: true
max_hint_window_in_ms: 10800000
hinted_handoff_throttle_in_kb: 1024
max_hints_delivery_threads: 2
authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
authorizer: org.apache.cassandra.auth.AllowAllAuthorizer
partitioner: org.apache.cassandra.dht.RandomPartitioner
data_file_directories:
- /tmp/cassandra/data
commitlog_directory: /tmp/cassandra/commitlog
disk_failure_policy: stop
key_cache_size_in_mb:
key_cache_save_period: 14400
# key_cache_keys_to_save: 100
row_cache_size_in_mb: 0
row_cache_save_period: 0
saved_caches_directory: /tmp/cassandra/saved_caches
commitlog_sync: periodic
commitlog_sync_period_in_ms: 10000
commitlog_segment_size_in_mb: 32
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "127.0.0.1"
concurrent_reads: 32
concurrent_writes: 32
memtable_flush_queue_size: 4
trickle_fsync: false
trickle_fsync_interval_in_kb: 10240
storage_port: 7000
ssl_storage_port: 7001
listen_address: localhost
start_native_transport: false
native_transport_port: 9042
start_rpc: true
rpc_address: localhost
rpc_port: 9160
rpc_keepalive: true
rpc_server_type: sync
thrift_framed_transport_size_in_mb: 15
thrift_max_message_length_in_mb: 16
incremental_backups: false
snapshot_before_compaction: false
auto_snapshot: true
column_index_size_in_kb: 64
in_memory_compaction_limit_in_mb: 64
multithreaded_compaction: false
compaction_throughput_mb_per_sec: 16
compaction_preheat_key_cache: true
read_request_timeout_in_ms: 10000
range_request_timeout_in_ms: 10000
write_request_timeout_in_ms: 10000
truncate_request_timeout_in_ms: 60000
request_timeout_in_ms: 10000
cross_node_timeout: false
endpoint_snitch: SimpleSnitch
dynamic_snitch_update_interval_in_ms: 100
dynamic_snitch_reset_interval_in_ms: 600000
dynamic_snitch_badness_threshold: 0.1
request_scheduler: org.apache.cassandra.scheduler.NoScheduler
index_interval: 128
server_encryption_options:
internode_encryption: none
keystore: conf/.keystore
keystore_password: cassandra
truststore: conf/.truststore
truststore_password: cassandra
client_encryption_options:
enabled: false
keystore: conf/.keystore
keystore_password: cassandra
internode_compression: all
由於字符限制StackOverflow的答案,我不得不刪除在這個文件中的評論很多。如果您需要任何參數信息,請下載cassandra發行版並查看包含cassandra.yaml
的詳細信息。
是的,好主意。我試圖做到這一點,不幸的是,泰坦嵌入的卡桑德拉拒絕了該文件,聲稱其中存在「未知選項」。刪除它們之後,輝煌的結果是在Cassandra內部的某個地方出現了'NullPointerException'。我的猜測是,我的Cassandra版本不同於此配置文件的設計版本。我實際上以不同的方式解決它,請參閱下面的答案 – Alan47