????????????????????????????

???????磬10G??棬100??region?????memstore 64M?????????region??????memstore???????100??memstore???????50%??????????lowerLimit???????????????????memstore????к???д?????????????Щ???regionδflush?????????????upperlimit????????region????block????????????flush??

????hfile.block.cache.size

??????????0.2

?????????storefile??????????Heap???С?????0.2???20%???????????????????????

????????????????????????????д???????0.4-0.5???????????д?????0.3????????д????????????ɡ????????????????????ο? hbase.regionserver.global.memstore.upperLimit ???????memstore?heap??????????????????????????????д??????????????????80-90%??????OOM?????????????á?

????hbase.hstore.blockingStoreFiles

??????????7

???????????compaction?????????Store?oulmn Family)???г???7??storefile??????????block???е?д????????flush??????storefile????????????

?????????block?????????region???д???????????????region?????????store file???????????????????storefile?????????region size/memstore size???????????region size??????????????????????region??????????storefile????

????hbase.hregion.memstore.block.multiplier

??????????2

??????????????region???memstore????????memstore.size???????С???block??region??????????????flush???????檔?????????????memstore?????С??????64M??????????£????63.9M???????Put?????100M???????д???????????????????put??1??Σ????memstore???С????????????????memstore.size??????????????????memstore???С????????memstore.size???block???????????????????????

????????? ?????????????????????????????????????????ó???(????????)??????????д??д??????????????????????ɡ????????????£????д???????????????????????????????????????????????????hfile.block.cache.size??hbase.regionserver.global.memstore.upperLimit/lowerLimit????????????棬???HBase server OOM??

????????

????????LZO???

????LZO???Hbase????GZip????????????????????????????μ? Using LZO Compression ???????????HBase??д???????????????LZO???????????????????洢?????????????鱣??????

?????????????????????Column Family

????Hbase?????????????????2-3??CF??????????CF??flush??????????????CF????????Ч???????flush????????????????IO??

????????????

???????????????????Hbase?????????????????region??????????????????? Table Creation: Pre-Creating Regions

????Hbase????????

????AutoFlush

??????HTable??setAutoFlush???false??????????????????????????Put?????????flush???????????????????

?????????true??

????Scan Caching

????scanner??λ????????????scan(?????????????????????scan)??

?????????? 1????????????

????Scan Attribute Selection

????scan?????????????Column Family?????????????????scan??????????row??????????(????Coulmn Family)??

????Close ResultScanners

???????scan???????????????ResultScanner??????RegionServer????????????

????Optimal Loading of Row Keys

????????scan??????????????????row key(?????CF?? qualifier??values??timestaps)??????????scan???????????filterList???????? MUST_PASS_ALL??????filterList??add FirstKeyOnlyFilter??KeyOnlyFilter????????????????????????

????Turn off WAL on Puts

??????Put?Щ?????????????????????writeToWAL(false)????????????д?????writeToWAL(false)????Put?????дWAL log???????????RegionServer崻????????????Put????Щ??????????????????

????????Bloom Filter

????Bloom Filter?????任????????????????