sstablepartitions
SSTableの大きなパーティションを識別します。
cassandra.yaml
cassandra.yamlファイルの場所は、インストールのタイプによって異なります。| パッケージ・インストール | /etc/dse/cassandra/cassandra.yaml | 
| tarボール・インストール | installation_location/resources/cassandra/conf/cassandra.yaml | 
SSTableの大きなパーティションを識別し、パーティション・サイズ、行数、セル・カウント、およびトゥームストーン数を出力します。
構文
sstablepartitions [-b] [-c cell_threshold] [-k partition_key] [-m] [-o tombstone_count_threshold] [-r] [-t partition_count_threshold] [-u] [-x partition_keys | -y] sstable_filepath | sstable_directory
| 構文規則 | 説明 | 
|---|---|
| 大文字 | リテラル・キーワード。 | 
| 小文字 | リテラル以外。 | 
Italics | 
            変数値。有効なオプションまたはユーザー定義値と置き換えます。 | 
[ ] | 
            任意。角かっこ( [] )で任意のコマンド引数を囲みます。角かっこは入力しないでください。 | 
          
( ) | 
            グループ。丸かっこ(( ))は、選択肢を含むグループを示します。丸かっこは入力しないでください。 | 
          
 |  | 
            または。縦棒(|)で代替要素を区切ります。要素のいずれかを入力してください。縦棒は入力しないでください。 | 
          
... | 
            繰り返し可能。省略記号(...)は、構文要素を必要な回数だけ繰り返すことができることを示します。 | 
          
'Literal string' | 
            単一引用符( ' )でCQL文内のリテラル文字を囲みます。大文字を維持するには、単一引用符を使用します。 | 
          
{ key:value } | 
            マップ・コレクション。中かっこ( { } )でマップ・コレクションまたはキーと値のペアを囲みます。コロンでキーと値を区切ります。 | 
          
<datatype1,datatype2> | 
            セット、リスト、マップ、またはタプル。山かっこ(< >)で、セット、リスト、マップまたはタプル内のデータ型を囲みます。データ型をカンマで区切ります。 | 
          
cql_statement; | 
            CQL文の終了。セミコロン( ; )ですべてのCQL文を終了します。 | 
          
[ -- ] | 
            コマンドライン・オプションとコマンド引数は、2つのハイフン(--)で区切ります。この構文は、引数がコマンドライン・オプションと間違われる可能性がある場合に役立ちます。 | 
          
' <schema> ...</schema> ' | 
            検索CQLのみ:単一引用符( ' )でXMLスキーマ宣言全体を囲みます。 | 
          
@xml_entity='xml_entity_type' | 
            検索CQLのみ:スキーマ・ファイルおよびsolrconfigファイル内のXML要素を上書きする実体とリテラル値を示します。 | 
短い形式と長い形式のパラメーターはカンマで区切られています。
コマンド引数
- -b, --backups
 - データ・ディレクトリーのバックアップを含めます(繰り返して行うスキャン)。
 - -c, --min-cells cell_threshold
 - セル・カウントのしきい値のパーティショニングを行います。
 - -k, --key partition_key
 - 含めるパーティション・キー。
 - -m, --csv
 - JSON形式の出力ではなく、マシンが読み取ることのできるCSV出力を生成します。
 - -o, --min-tombstones tombstone_threshold
 - トゥームストーン・カウントのしきい値のパーティショニングを行います。
 - -r, --recursive
 - 繰り返し。
 - sstable_directory
 - SSTableデータ・ディレクトリーの絶対パス。 cassandra.yaml のdata_file_directoriesプロパティは、デフォルトのディレクトリーを定義します。
 - sstable_filepath
 Data.dbで終わるSSTableデータ・ファイルの、明示的または相対的なファイルパス。- -t, --min-size partition_threshold
 - サイズのしきい値のパーティショニングを行います。
 - -u, --current-timestamp
 - タイムスタンプを出力に含めます。タイムスタンプは、エポック以来の秒数であり、 TTL期限切れの計算の単位時間です。
 - -x, --exclude-key partition_key
 - 除外するパーティション・キー。-yオプションが指定されている場合は無視されます。
 - -y, --partitions-only
 - 簡単なパーティション情報のみ。プロセスおよび出力に基づく、パーティションごとの詳細な行/セル/トゥームストーンの情報を除外します。
 
例
すべてのSSTableのパーティション統計を単一テーブルに分析します
sstablepartitions -r /var/lib/cassandra/data/stresscql/blogposts-7dd6dfc289b511e8a4a329556a9391cc/
Processing stresscql.blogposts-7dd6dfc289b511e8a4a329556a9391cc #3 (bti-aa) (6445137 bytes uncompressed, 5416338 bytes on disk)
Partition size            Row count           Cell count      Tombstone count
p50                    124                    1                    1                    1
p75                    149                    1                    1                    1
p90                    149                    2                    2                    1
p95                    179                    2                    2                    1
p99                    215                    3                    3                    1
p999                   258                    4                    4                    1
min                     51                    0                    0                    0
max                   8239                  179                  179                    1
count                56696
time                137676
        
Processing stresscql.blogposts-7dd6dfc289b511e8a4a329556a9391cc #4 (bti-aa) (230134 bytes uncompressed, 192999 bytes on disk)
Partition size            Row count           Cell count      Tombstone count
p50                    124                    1                    1                    1
p75                    124                    1                    1                    1
p90                    149                    1                    1                    1
p95                    149                    1                    1                    1
p99                    149                    1                    1                    1
p999                   179                    2                    2                    1
min                     51                    0                    0                    0
max                    446                   10                   10                    1
count                 2169
time                  3626
      セル・カウントのしきい値が10以上のパーティションのみを出力します
sstablepartitions -c 10 /var/lib/cassandra/data/stresscql/blogposts-7dd6dfc289b511e8a4a329556a9391cc/aa-4-bti-Data.db
Processing stresscql.blogposts-7dd6dfc289b511e8a4a329556a9391cc #4 (bti-aa) (230134 bytes uncompressed, 192999 bytes on disk)
Partition: 'Fwl
Cc	xD06iw_]Q|[t[KzCI&	$' (46776c0b4363097815114430361169775f7f5d511b3b08177c5b745b4b1306007a434926091a24) live, position: 208502, size: 434, rows: 10, cells: 10, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)
Summary of stresscql.blogposts-7dd6dfc289b511e8a4a329556a9391cc #4 (bti-aa):
File: /home/dimitarndimitrov/.ccm/c13529-master/node1/data0/stresscql/blogposts-7dd6dfc289b511e8a4a329556a9391cc/aa-4-bti-Data.db
1 partitions match
Keys: Fwl
Cc	xD06iw_]Q|[t[KzCI&	$
Partition size            Row count           Cell count      Tombstone count
p50                    124                    1                    1                    1
p75                    124                    1                    1                    1
p90                    149                    1                    1                    1
p95                    149                    1                    1                    1
p99                    149                    1                    1                    1
p999                   179                    2                    2                    1
min                     51                    0                    0                    0
max                    446                   10                   10                    1
count                 2169
time                  4875
      マシンが読み取ることのできるCSV出力を出力します
sstablepartitions -c 10 -m /var/lib/cassandra/data/stresscql/blogposts-7dd6dfc289b511e8a4a329556a9391cc/aa-4-bti-Data.db
key,keyBinary,live,offset,size,rowCount,cellCount,tombstoneCount,rowTombstoneCount,rangeTombstoneCount,complexTombstoneCount,cellTombstoneCount,rowTtlExpired,cellTtlExpired,directory,keyspace,table,index,snapshot,backup,generation,format,version
"Fwl
Cc	xD06iw_]Q|[t[KzCI&	$",46776c0b4363097815114430361169775f7f5d511b3b08177c5b745b4b1306007a434926091a24,true,208502,434,10,10,0,0,0,0,0,0,0,/home/dimitarndimitrov/.ccm/c13529-master/node1/data0/stresscql/blogposts-7dd6dfc289b511e8a4a329556a9391cc/aa-4-bti-Data.db,stresscql,blogposts,,,,4,bti,aa
    