このブログは99%ののほほんと1%のお菓子でできています。
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
設定ファイル | 設定項目 | ポート | 説明 |
cassandra.yaml | rpc_port | 9160 | Thrift(RPC)等での接続ポート |
cassandra.yaml | native_transport_port | 9042 | CQL用のトランスポート |
cassandra.yaml | storage_port | 7000 | 複数インスタンス(ノード)間で連携するためのポート |
cassandra.yaml | ssl_storage_port | 7001 | 複数インスタンス(ノード)間で連携するためのポート(SSL) |
cassandra-env.sh | JMX_PORT | 7199 | JMXの接続用ポート |
$ {CASSANDRA_HOME}/bin/nodetool -h {対象ノードのIPアドレス} flush |
$ {CASSANDRA_HOME}/bin/nodetool -h {対象ノードのIPアドレス} snapshot -t {スナップショット名} |
$ {CASSANDRA_HOME}/bin/nodetool -h {対象ノードのIPアドレス} clearsnapshot -t {スナップショット名} |
[default@unknown] help; |
[default@unknown] ?; |
[default@unknown] help {コマンド}; |
[default@unknown] show keyspaces; |
[default@unknown] describe sample; Keyspace: sample: Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy Durable Writes: true Options: [datacenter1:1] Column Families: |
[default@unknown] create keyspace sample; |
[default@unknown] drop keyspace sample; |
[default@unknown] use sample; |
[default@sample] create column family users; |
[default@sample] create column family users with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type; |
[default@sample] create column family users with column_type = 'Super'; |
[default@sample] create column family users with column_type=Super and comparator=UTF8Type and subcomparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type; |
[default@sample] describe users; ColumnFamily: users Key Validation Class: org.apache.cassandra.db.marshal.BytesType Default column value validator:org.apache.cassandra.db.marshal.BytesType Columns sorted by: org.apache.cassandra.db.marshal.BytesType GC grace seconds: 864000 Compaction min/max thresholds: 4/32 Read repair chance: 0.1 DC Local Read repair chance: 0.0 Populate IO Cache on flush: false Replicate on write: true Caching: KEYS_ONLY Bloom Filter FP chance: default Built indexes: [] Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy Compression Options: sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor |
[default@sample] drop column family users; |
[default@sample] truncate users; |
[default@sample] set users['rowkey1']['column1'] = 'value1'; |
[default@sample] set users['rowkey1']['spcolumn1']['column1'] = 'value1'; |
[default@sample] count users['rowkey1']; |
[default@sample] count users['rowkey1']['spcolumn1']; |
[default@sample] get users['rowkey1']; |
[default@sample] get users['rowkey1']['column1']; |
[default@sample] get users['rowkey1']['spcolumn1']; |
[default@sample] get users['rowkey1']['spcolumn1']['column1']; |
[default@sample] list users; |
[default@sample] del users['rowkey1']; |
[default@sample] del users['rowkey1']['column1']; |
[default@sample] get users['rowkey1']['spcolumn1']; |
[default@sample] get users['rowkey1']['spcolumn1']['column1']; |
[default@sample] create column family users with column_metadata = [ { column_name: column1, validation_class: UTF8Type, index_type: KEYS} ]; |
[default@sample] update column family users with column_metadata = [ { column_name: column1, validation_class: UTF8Type, index_type: KEYS} ]; |
[default@sample] get users where column1 = 'value1'; |