我正在观看:https: //academy.datastax.com/courses/learning-cassandra-read-path/understanding-partition-summaries-and-indexes 我对此演示文稿有疑问.
分区摘要代表什么?:)
我的第一个想法是它只是一个缓存,保持x%的键位置.这意味着大约一个126的请求可以直接获得一个密钥而其他125个必须遍历整个表.但我认为这是非常无效的.
我的第二个想法是,分区摘要以某种方式能够为指定的键提供一系列索引,其中应存在给定键的行.但我无法想象这是如何实现的?特别是如果这个表应该是大小|分区索引|/index_interval
我想到的另一个问题是,SSTable可以为特定密钥保留许多条目吗?
谢谢,krzychusan
我正在经历'了解你一些haskell'并且我写了以下应用程序:
import System.IO
main = do
filename <- getLine
handle <- openFile filename ReadMode
content <- hGetContents handle
putStr . unlines . (map isLong) . lines $ content
hClose handle
isLong :: String -> String
isLong x = if length x > 10 then x ++ " long enough" else x ++ " could be better!"
Run Code Online (Sandbox Code Playgroud)
它可以工作,但当我删除行和内容之间的"$"时,编译失败.
你能帮我理解为什么这是错的吗?
我想我用点组成语句,然后我得到一个函数(String - > IO())并将其应用于"内容",但为什么这里需要"$"?
谢谢!