前言 ............................................................................... XIII
第1 章 為什麼會有Kudu ..................................................1
Kudu 為什麼重要 .................................................................................... 1
易用性驅動接納度 .................................................................................. 2
新的應用場景 ......................................................................................... 5
物聯網 ...........................................................................................................5
現有的實時分析方案 .....................................................................................7
實時處理 .....................................................................................................13
硬件環境 ............................................................................................... 15
Kudu 在大數據生態中的獨特位置 ........................................................ 17
與其他生態係統的組件對比 .......................................................................19
與大數據組件對比——HDFS、HBase 和Cassandra ..................................24
小結 ...................................................................................................... 26
第2 章 Kudu 簡介 ..........................................................27
Kudu 的高層設計 .................................................................................. 29
Kudu 中的角色 ............................................................................................29
master 服務器 ..............................................................................................31
tablet 服務器................................................................................................32
Kudu 中的概念與機製 .......................................................................... 42
熱點 .............................................................................................................42
分區 .............................................................................................................44
第3 章 安裝與運行 .........................................................49
安裝 ...................................................................................................... 49
使用Kudu Quickstart VM ...........................................................................49
使用Cloudera Manager ...............................................................................51
從源代碼構建 ..............................................................................................52
軟件包 .........................................................................................................53
Cloudera Quickstart VM ..............................................................................53
快速安裝:3 分鍾或者更短 .................................................................. 54
小結 ...................................................................................................... 58
第4 章 Kudu 的管理 .......................................................59
為Kudu 做規劃 ..................................................................................... 59
master 服務器和tablet 服務器 .....................................................................60
預寫日誌 .....................................................................................................65
數據服務器和存儲 ......................................................................................68
復製策略(replication strategy) ..................................................................69
部署時的注意事項:是采用新集群還是現有集群 ................................ 70
全新的僅有Kudu 的集群 ............................................................................70
全新的包含Kudu 的Hadoop 集群 ..............................................................71
在現有的Hadoop 集群中添加Kudu ...........................................................77
tablet 服務器和master 服務器的Web UI .............................................. 81
master 服務器UI 和tablet 服務器UI ..........................................................82
master 服務器UI .........................................................................................83
tablet 服務器UI ...........................................................................................83
Kudu 命令行接口 .................................................................................. 84
集群 .............................................................................................................84
文件係統 .....................................................................................................86
tablet 副本 ...................................................................................................92
與Raft 一緻性相關的元數據.....................................................................106
添加和刪除tablet 服務器 .................................................................... 107
添加tablet 服務器 .....................................................................................107
刪除tablet 服務器 .....................................................................................108
安全 .................................................................................................... 109
一個簡單的類比 ........................................................................................ 110
Kudu 的安全功能 ...................................................................................... 112
基本的性能調優 .................................................................................. 117
Kudu 的內存限製 ...................................................................................... 117
維護管理器的綫程 .................................................................................... 118
監控性能 ................................................................................................... 119
未雨綢繆,遠離麻煩 .......................................................................... 119
避免耗盡磁盤空間 .................................................................................... 119
容忍磁盤故障 ............................................................................................120
備份 ...........................................................................................................120
小結 .................................................................................................... 121
第5 章 Kudu 常用的開發接口 .......................................123
客戶端API .......................................................................................... 124
Kudu Client(客戶端)...............................................................................124
Kudu Table ................................................................................................125
Kudu DDL .................................................................................................125
Kudu 掃描器(Scanner)讀取模式 ...........................................................126
C++ API .............................................................................................. 127
Python API .......................................................................................... 130
準備Python 開發環境 ...............................................................................131
使用Python 開發Kudu 應用 .....................................................................131
Java ..................................................................................................... 135
Java 應用 ...................................................................................................137
Spark ................................................................................................... 140
在Impala 中使用Kudu ....................................................................... 145
第6 章 錶和模式設計 ...................................................149
模式設計基礎 ..................................................................................... 150
在綫事務處理/ 在綫分析處理混閤的模式設計 .................................. 151
Lambda 架構 .............................................................................................151
OLTP/OLAP 拆分 ......................................................................................152
主鍵和列的設計 .................................................................................. 153
列模式的其他注意事項 .............................................................................154
分區的基礎知識 .................................................................................. 160
範圍分區 ...................................................................................................161
哈希分區 ...................................................................................................161
模式的更改 ......................................................................................... 162
最佳實踐和提示 .................................................................................. 163
分區 ...........................................................................................................163
大對象 .......................................................................................................164
decimal(十進製數)..................................................................................164
不重復的字符串 ........................................................................................165
壓縮 ...........................................................................................................165
對象的命名 ................................................................................................165
列的數量 ...................................................................................................165
二進製類型 ................................................................................................166
網絡包示例 ......................................................................................... 166
小結 .................................................................................................... 168
第7 章 Kudu 用例 ........................................................169
實時物聯網分析 .................................................................................. 169
預測建模 ............................................................................................. 173
多平颱混閤方案 .................................................................................. 176
關於作者 ........................................................................180
封麵圖片 ........................................................................182
· · · · · · (
收起)