0
我使用CassandraDB保存度量標準數據。爲什麼我要用空值獲取列條目?
我創建了一個ColumnFamily中與名metrics
:
CREATE TABLE metrics (
mbean text,
metricstime timestamp,
ftpconnectionstate int,
PRIMARY KEY (mbean, metricstime));
由此產生的 「表」,在cqlsh看起來像這樣:
mbean | metricstime | ftpconnectionstate
-----------+--------------------------+--------------------
FtpOnline | 2016-10-10 14:38:45+0000 | 1
FtpOnline | 2016-10-10 14:38:50+0000 | 1
FtpOnline | 2016-10-10 14:38:55+0000 | 1
FtpOnline | 2016-10-10 14:39:00+0000 | 1
FtpOnline | 2016-10-10 14:39:05+0000 | 1
FtpOnline | 2016-10-10 14:39:10+0000 | 1
FtpOnline | 2016-10-10 14:39:15+0000 | 1
FtpOnline | 2016-10-10 14:39:20+0000 | 1
引擎蓋下卡桑德拉節省這樣的值:
RowKey: FtpOnline
=> (name=2016-10-10 14\:38\:45+0000:, value=, timestamp=1476110327630000, ttl=604800)
=> (name=2016-10-10 14\:38\:45+0000:ftpconnectionstate, value=00000001, timestamp=1476110327630000, ttl=604800)
=> (name=2016-10-10 14\:38\:50+0000:, value=, timestamp=1476110331832000, ttl=604800)
=> (name=2016-10-10 14\:38\:50+0000:ftpconnectionstate, value=00000001, timestamp=1476110331832000, ttl=604800)
=> (name=2016-10-10 14\:38\:55+0000:, value=, timestamp=1476110336830000, ttl=604800)
=> (name=2016-10-10 14\:38\:55+0000:ftpconnectionstate, value=00000001, timestamp=1476110336830000, ttl=604800)
=> (name=2016-10-10 14\:39\:00+0000:, value=, timestamp=1476110341831000, ttl=604800)
=> (name=2016-10-10 14\:39\:00+0000:ftpconnectionstate, value=00000001, timestamp=1476110341831000, ttl=604800)
=> (name=2016-10-10 14\:39\:05+0000:, value=, timestamp=1476110346832000, ttl=604800)
=> (name=2016-10-10 14\:39\:05+0000:ftpconnectionstate, value=00000001, timestamp=1476110346832000, ttl=604800)
現在您可以看到存在具有空值的列條目。 我的問題是:有沒有可能擺脫它們?