[TOC]
摘錄一
hbase.rootdir
這個(gè)目錄是region server的共享目錄菇怀,用來持久化HBase谐算。URL需要是'完全正確'的,還要包含文件系統(tǒng)的scheme值骇。例如害驹,要表示hdfs中的'/hbase'目錄,namenode 運(yùn)行在namenode.example.org的9090端口苟耻。則需要設(shè)置為hdfs://namenode.example.org:9000/hbase篇恒。默認(rèn)情況下HBase是寫到/tmp的。不改這個(gè)配置凶杖,數(shù)據(jù)會(huì)在重啟的時(shí)候丟失胁艰。
默認(rèn): file:///tmp/hbase-${user.name}/hbase
hbase.master.port
HBase的Master的端口.
默認(rèn): 60000
hbase.cluster.distributed
HBase的運(yùn)行模式。false是單機(jī)模式,true是分布式模式腾么。若為false,HBase和Zookeeper會(huì)運(yùn)行在同一個(gè)JVM里面奈梳。
默認(rèn): false
hbase.tmp.dir
本地文件系統(tǒng)的臨時(shí)文件夾〗馐可以修改到一個(gè)更為持久的目錄上攘须。(/tmp會(huì)在重啟時(shí)清楚)
默認(rèn):${java.io.tmpdir}/hbase-${user.name}
hbase.local.dir
作為本地存儲(chǔ),位于本地文件系統(tǒng)的路徑殴泰。
默認(rèn): ${hbase.tmp.dir}/local/
hbase.master.info.port
HBase Master web 界面端口. 設(shè)置為-1 意味著你不想讓他運(yùn)行于宙。
0.98 版本以后默認(rèn): 16010 以前是 60010
hbase.master.info.bindAddress
HBase Master web 界面綁定的端口
默認(rèn): 0.0.0.0
hbase.client.write.buffer
HTable客戶端的寫緩沖的默認(rèn)大小。這個(gè)值越大悍汛,需要消耗的內(nèi)存越大限煞。因?yàn)榫彌_在客戶端和服務(wù)端都有實(shí)例,所以需要消耗客戶端和服務(wù)端兩個(gè)地方的內(nèi)存员凝。得到的好處是署驻,可以減少RPC的次數(shù)〗∨可以這樣估算服務(wù)器端被占用的內(nèi)存: hbase.client.write.buffer * hbase.regionserver.handler.count
默認(rèn): 2097152
hbase.regionserver.port
HBase RegionServer綁定的端口
0.98 以前默認(rèn): 60020 以后默認(rèn)是:16020
hbase.regionserver.info.port
HBase RegionServer web 界面綁定的端口 設(shè)置為 -1 意味這你不想與運(yùn)行 RegionServer 界面.
0.98 以前默認(rèn): 60030 以后默認(rèn)是:16030
hbase.regionserver.info.port.auto
Master或RegionServer是否要?jiǎng)討B(tài)搜一個(gè)可以用的端口來綁定界面旺上。當(dāng)hbase.regionserver.info.port已經(jīng)被占用的時(shí)候,可以搜一個(gè)空閑的端口綁定糖埋。這個(gè)功能在測試的時(shí)候很有用宣吱。默認(rèn)關(guān)閉。
默認(rèn): false
hbase.regionserver.info.bindAddress
HBase RegionServer web 界面的IP地址
默認(rèn): 0.0.0.0
hbase.regionserver.class
RegionServer 使用的接口瞳别≌骱颍客戶端打開代理來連接region server的時(shí)候會(huì)使用到。
默認(rèn): org.apache.hadoop.hbase.ipc.HRegionInterface
hbase.client.pause
通常的客戶端暫停時(shí)間祟敛。最多的用法是客戶端在重試前的等待時(shí)間疤坝。比如失敗的get操作和region查詢操作等都很可能用到。
默認(rèn): 1000
hbase.client.retries.number
最大重試次數(shù)馆铁。所有需重試操作的最大值跑揉。例如從root region服務(wù)器獲取root region,Get單元值埠巨,行Update操作等等历谍。這是最大重試錯(cuò)誤的值。 Default: 10.
0.98 以前默認(rèn): 10 以后默認(rèn)是:35
hbase.bulkload.retries.number
最大重試次數(shù)辣垒。 原子批加載嘗試的迭代最大次數(shù)望侈。 0 永不放棄。默認(rèn): 0.
默認(rèn): 0
hbase.client.scanner.caching
當(dāng)調(diào)用Scanner的next方法勋桶,而值又不在緩存里的時(shí)候脱衙,從服務(wù)端一次獲取的行數(shù)侥猬。越大的值意味著Scanner會(huì)快一些,但是會(huì)占用更多的內(nèi)存岂丘。當(dāng)緩沖被占滿的時(shí)候陵究,next方法調(diào)用會(huì)越來越慢眠饮。慢到一定程度奥帘,可能會(huì)導(dǎo)致超時(shí)。例如超過了hbase.regionserver.lease.period仪召。
默認(rèn): 100
hbase.client.keyvalue.maxsize
一個(gè)KeyValue實(shí)例的最大size.這個(gè)是用來設(shè)置存儲(chǔ)文件中的單個(gè)entry的大小上界寨蹋。因?yàn)橐粋€(gè)KeyValue是不能分割的,所以可以避免因?yàn)閿?shù)據(jù)過大導(dǎo)致region不可分割扔茅。明智的做法是把它設(shè)為可以被最大region size整除的數(shù)已旧。如果設(shè)置為0或者更小,就會(huì)禁用這個(gè)檢查召娜。默認(rèn)10MB运褪。
默認(rèn): 10485760
hbase.regionserver.lease.period
客戶端租用HRegion server 期限,即超時(shí)閥值玖瘸。單位是毫秒秸讹。默認(rèn)情況下,客戶端必須在這個(gè)時(shí)間內(nèi)發(fā)一條信息雅倒,否則視為死掉璃诀。
默認(rèn): 60000
hbase.regionserver.handler.count
RegionServers受理的RPC Server實(shí)例數(shù)量。對于Master來說蔑匣,這個(gè)屬性是Master受理的handler數(shù)量
默認(rèn): 10
hbase.regionserver.msginterval
RegionServer 發(fā)消息給 Master 時(shí)間間隔劣欢,單位是毫秒
默認(rèn): 3000
hbase.regionserver.optionallogflushinterval
將Hlog同步到HDFS的間隔。如果Hlog沒有積累到一定的數(shù)量裁良,到了時(shí)間凿将,也會(huì)觸發(fā)同步。默認(rèn)是1秒价脾,單位毫秒丸相。
默認(rèn): 1000
hbase.regionserver.regionSplitLimit
region的數(shù)量到了這個(gè)值后就不會(huì)在分裂了。這不是一個(gè)region數(shù)量的硬性限制彼棍。但是起到了一定指導(dǎo)性的作用灭忠,到了這個(gè)值就該停止分裂了。默認(rèn)是MAX_INT.就是說不阻止分裂座硕。
默認(rèn): 2147483647
hbase.regionserver.logroll.period
提交commit log的間隔弛作,不管有沒有寫足夠的值。
默認(rèn): 3600000
hbase.regionserver.hlog.reader.impl
HLog file reader 的實(shí)現(xiàn).
默認(rèn): org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogReader
hbase.regionserver.hlog.writer.impl
HLog file writer 的實(shí)現(xiàn).
默認(rèn): org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogWriter
hbase.regionserver.nbreservationblocks
儲(chǔ)備的內(nèi)存block的數(shù)量(譯者注:就像石油儲(chǔ)備一樣)华匾。當(dāng)發(fā)生out of memory 異常的時(shí)候映琳,我們可以用這些內(nèi)存在RegionServer停止之前做清理操作机隙。
默認(rèn): 4
hbase.zookeeper.dns.interface
當(dāng)使用DNS的時(shí)候,Zookeeper用來上報(bào)的IP地址的網(wǎng)絡(luò)接口名字萨西。
默認(rèn): default
hbase.zookeeper.dns.nameserver
當(dāng)使用DNS的時(shí)候有鹿,Zookeepr使用的DNS的域名或者IP 地址,Zookeeper用它來確定和master用來進(jìn)行通訊的域名.
默認(rèn): default
hbase.regionserver.dns.interface
當(dāng)使用DNS的時(shí)候谎脯,RegionServer用來上報(bào)的IP地址的網(wǎng)絡(luò)接口名字葱跋。
默認(rèn): default
hbase.regionserver.dns.nameserver
當(dāng)使用DNS的時(shí)候,RegionServer使用的DNS的域名或者IP 地址源梭,RegionServer用它來確定和master用來進(jìn)行通訊的域名.
默認(rèn): default
hbase.master.dns.interface
當(dāng)使用DNS的時(shí)候娱俺,Master用來上報(bào)的IP地址的網(wǎng)絡(luò)接口名字。
默認(rèn): default
hbase.master.dns.nameserver
當(dāng)使用DNS的時(shí)候废麻,RegionServer使用的DNS的域名或者IP 地址荠卷,Master用它來確定用來進(jìn)行通訊的域名.
默認(rèn): default
hbase.balancer.period
Master執(zhí)行region balancer的間隔。
默認(rèn): 300000
hbase.regions.slop
當(dāng)任一區(qū)域服務(wù)器有average + (average * slop)個(gè)分區(qū)烛愧,將會(huì)執(zhí)行重新均衡油宜。默認(rèn) 20% slop .
默認(rèn):0.2
hbase.master.logcleaner.ttl
Hlog存在于.oldlogdir 文件夾的最長時(shí)間, 超過了就會(huì)被 Master 的線程清理掉.
默認(rèn): 600000
hbase.master.logcleaner.plugins
LogsCleaner服務(wù)會(huì)執(zhí)行的一組LogCleanerDelegat。值用逗號間隔的文本表示怜姿。這些WAL/HLog cleaners會(huì)按順序調(diào)用慎冤。可以把先調(diào)用的放在前面社牲。你可以實(shí)現(xiàn)自己的LogCleanerDelegat粪薛,加到Classpath下,然后在這里寫下類的全稱搏恤。一般都是加在默認(rèn)值的前面违寿。
默認(rèn): org.apache.hadoop.hbase.master.TimeToLiveLogCleaner
hbase.regionserver.global.memstore.upperLimit
單個(gè)region server的全部memtores的最大值。超過這個(gè)值熟空,一個(gè)新的update操作會(huì)被掛起藤巢,強(qiáng)制執(zhí)行flush操作。
默認(rèn): 0.4
hbase.regionserver.global.memstore.lowerLimit
當(dāng)強(qiáng)制執(zhí)行flush操作的時(shí)候息罗,當(dāng)?shù)陀谶@個(gè)值的時(shí)候掂咒,flush會(huì)停止。默認(rèn)是堆大小的 35% . 如果這個(gè)值和 hbase.regionserver.global.memstore.upperLimit 相同就意味著當(dāng)update操作因?yàn)閮?nèi)存限制被掛起時(shí)迈喉,會(huì)盡量少的執(zhí)行flush(譯者注:一旦執(zhí)行flush绍刮,值就會(huì)比下限要低,不再執(zhí)行)
默認(rèn): 0.35
hbase.server.thread.wakefrequency
service工作的sleep間隔挨摸,單位毫秒孩革。 可以作為service線程的sleep間隔,比如log roller.
默認(rèn): 10000
hbase.server.versionfile.writeattempts
退出前嘗試寫版本文件的次數(shù)得运。每次嘗試由 hbase.server.thread.wakefrequency 毫秒數(shù)間隔膝蜈。
默認(rèn): 3
hbase.hregion.memstore.flush.size
當(dāng)memstore的大小超過這個(gè)值的時(shí)候锅移,會(huì)flush到磁盤。這個(gè)值被一個(gè)線程每隔hbase.server.thread.wakefrequency檢查一下饱搏。
默認(rèn):134217728
hbase.hregion.preclose.flush.size
當(dāng)一個(gè)region中的memstore的大小大于這個(gè)值的時(shí)候非剃,我們又觸發(fā)了close.會(huì)先運(yùn)行“pre-flush”操作,清理這個(gè)需要關(guān)閉的memstore推沸,然后將這個(gè)region下線备绽。當(dāng)一個(gè)region下線了,我們無法再進(jìn)行任何寫操作坤学。如果一個(gè)memstore很大的時(shí)候疯坤,flush操作會(huì)消耗很多時(shí)間报慕。"pre-flush"操作意味著在region下線之前深浮,會(huì)先把memstore清空。這樣在最終執(zhí)行close操作的時(shí)候眠冈,flush操作會(huì)很快飞苇。
默認(rèn): 5242880
hbase.hregion.memstore.block.multiplier
如果memstore有hbase.hregion.memstore.block.multiplier倍數(shù)的hbase.hregion.flush.size的大小,就會(huì)阻塞update操作蜗顽。這是為了預(yù)防在update高峰期會(huì)導(dǎo)致的失控布卡。如果不設(shè)上界,flush的時(shí)候會(huì)花很長的時(shí)間來合并或者分割雇盖,最壞的情況就是引發(fā)out of memory異常忿等。(譯者注:內(nèi)存操作的速度和磁盤不匹配,需要等一等崔挖。原文似乎有誤)
默認(rèn): 2
hbase.hregion.memstore.mslab.enabled
體驗(yàn)特性:啟用memStore分配本地緩沖區(qū)贸街。這個(gè)特性是為了防止在大量寫負(fù)載的時(shí)候堆的碎片過多。這可以減少GC操作的頻率狸相。(GC有可能會(huì)Stop the world)(譯者注:實(shí)現(xiàn)的原理相當(dāng)于預(yù)分配內(nèi)存薛匪,而不是每一個(gè)值都要從堆里分配)
默認(rèn): true
hbase.hregion.max.filesize
最大HStoreFile大小。若某個(gè)列族的HStoreFile增長達(dá)到這個(gè)值脓鹃,這個(gè)Hegion會(huì)被切割成兩個(gè)逸尖。 默認(rèn): 10G.
默認(rèn):10737418240
hbase.hstore.compactionThreshold
當(dāng)一個(gè)HStore含有多于這個(gè)值的HStoreFiles(每一個(gè)memstore flush產(chǎn)生一個(gè)HStoreFile)的時(shí)候,會(huì)執(zhí)行一個(gè)合并操作瘸右,把這HStoreFiles寫成一個(gè)娇跟。這個(gè)值越大,需要合并的時(shí)間就越長太颤。
默認(rèn): 3
hbase.hstore.blockingStoreFiles
當(dāng)一個(gè)HStore含有多于這個(gè)值的HStoreFiles(每一個(gè)memstore flush產(chǎn)生一個(gè)HStoreFile)的時(shí)候苞俘,會(huì)執(zhí)行一個(gè)合并操作,update會(huì)阻塞直到合并完成栋齿,直到超過了hbase.hstore.blockingWaitTime的值
默認(rèn): 7
hbase.hstore.blockingWaitTime
hbase.hstore.blockingStoreFiles所限制的StoreFile數(shù)量會(huì)導(dǎo)致update阻塞苗胀,這個(gè)時(shí)間是來限制阻塞時(shí)間的襟诸。當(dāng)超過了這個(gè)時(shí)間,HRegion會(huì)停止阻塞update操作基协,不過合并還有沒有完成歌亲。默認(rèn)為90s.
默認(rèn): 90000
hbase.hstore.compaction.max
每個(gè)“小”合并的HStoreFiles最大數(shù)量。
默認(rèn): 10
hbase.hregion.majorcompaction
一個(gè)Region中的所有HStoreFile的major compactions的時(shí)間間隔澜驮。默認(rèn)是1天陷揪。 設(shè)置為0就是禁用這個(gè)功能。
默認(rèn): 86400000
hbase.storescanner.parallel.seek.enable
允許 StoreFileScanner 并行搜索 StoreScanner, 一個(gè)在特定條件下降低延遲的特性杂穷。
默認(rèn): false
hbase.storescanner.parallel.seek.threads
并行搜索特性打開后悍缠,默認(rèn)線程池大小。
默認(rèn): 10
hbase.mapreduce.hfileoutputformat.blocksize
MapReduce中HFileOutputFormat可以寫 storefiles/hfiles. 這個(gè)值是hfile的blocksize的最小值耐量。通常在HBase寫Hfile的時(shí)候飞蚓,bloocksize是由table schema(HColumnDescriptor)決定的,但是在mapreduce寫的時(shí)候廊蜒,我們無法獲取schema中blocksize趴拧。這個(gè)值越小,你的索引就越大山叮,你隨機(jī)訪問需要獲取的數(shù)據(jù)就越小著榴。如果你的cell都很小,而且你需要更快的隨機(jī)訪問屁倔,可以把這個(gè)值調(diào)低脑又。
默認(rèn): 65536
hfile.block.cache.size
分配給HFile/StoreFile的block cache占最大堆(-Xmx setting)的比例。默認(rèn)0.25意思是分配25%锐借,設(shè)置為0就是禁用问麸,但不推薦。
默認(rèn):0.25
hbase.hash.type
哈希函數(shù)使用的哈希算法瞎饲】谛穑可以選擇兩個(gè)值:: murmur (MurmurHash) 和 jenkins (JenkinsHash). 這個(gè)哈希是給 bloom filters用的.
默認(rèn): murmur
hfile.block.index.cacheonwrite
在index寫入的時(shí)候允許put無根(non-root)的多級索引塊到block cache里,默認(rèn)是false嗅战;
hfile.index.block.max.size:在多級索引的樹形結(jié)構(gòu)里妄田,如果任何一層的block index達(dá)到這個(gè)配置大小,則block寫出驮捍,同時(shí)
替換上新的block疟呐,默認(rèn)是131072;
hfile.format.version
新文件的HFile 格式版本东且,設(shè)置為1來測試向后兼容启具,默認(rèn)是2;
io.storefile.bloom.block.size
一個(gè)聯(lián)合布隆過濾器的單一塊(chunk)的大小珊泳,這個(gè)值是一個(gè)逼近值鲁冯,默認(rèn)是131072拷沸;
hfile.block.bloom.cacheonwrite
對于組合布隆過濾器的內(nèi)聯(lián)block開啟cache-on-write,默認(rèn)是false
hbase.rs.cacheblocksonwrite
當(dāng)一個(gè)HFile block完成時(shí)是否寫入block cache薯演,默認(rèn)是false
hbase.rpc.server.engine
hbase 做rpc server的調(diào)度管理類撞芍,實(shí)現(xiàn)自org.apache.hadoop.ipc.RpcServerEngine,默認(rèn)是org.apache.hadoop.hbase.ipc.ProtobufRpcServerEngine
hbase.ipc.client.tcpnodelay
默認(rèn)是true跨扮,具體就是在tcp socket連接時(shí)設(shè)置 no delay
hbase.master.keytab.file
HMaster server驗(yàn)證登錄使用的kerberos keytab 文件路徑序无。(譯者注:HBase使用Kerberos實(shí)現(xiàn)安全)
默認(rèn):
hbase.master.kerberos.principal
例如. "hbase/_HOST@EXAMPLE.COM". HMaster運(yùn)行需要使用 kerberos principal name. principal name 可以在: user/hostname@DOMAIN 中獲取. 如果 "_HOST" 被用做hostname portion,需要使用實(shí)際運(yùn)行的hostname來替代它衡创。
默認(rèn):
hbase.regionserver.keytab.file
HRegionServer驗(yàn)證登錄使用的kerberos keytab 文件路徑帝嗡。
默認(rèn):
hbase.regionserver.kerberos.principal
例如. "hbase/_HOST@EXAMPLE.COM". HRegionServer運(yùn)行需要使用 kerberos principal name. principal name 可以在: user/hostname@DOMAIN 中獲取. 如果 "_HOST" 被用做hostname portion,需要使用實(shí)際運(yùn)行的hostname來替代它璃氢。在這個(gè)文件中必須要有一個(gè)entry來描述 hbase.regionserver.keytab.file
默認(rèn):
hadoop.policy.file
RPC服務(wù)器做權(quán)限認(rèn)證時(shí)需要的安全策略配置文件哟玷,在Hbase security開啟后使用,默認(rèn)是habse-policy.xml拔莱;
hbase.superuser
Hbase security 開啟后的超級用戶配置碗降,一系列由逗號隔開的user或者group隘竭;
hbase.auth.key.update.interval
Hbase security開啟后服務(wù)端更新認(rèn)證key的間隔時(shí)間:默認(rèn)是86400000毫秒塘秦;
hbase.auth.token.max.lifetime
Hbase security開啟后,認(rèn)證token下發(fā)后的生存周期动看,默認(rèn)是604800000毫秒
zookeeper.session.timeout
ZooKeeper 會(huì)話超時(shí).HBase把這個(gè)值傳遞改zk集群尊剔,向他推薦一個(gè)會(huì)話的最大超時(shí)時(shí)間。詳見http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkSessions "The client sends a requested timeout, the server responds with the timeout that it can give the client. "。 單位是毫秒
默認(rèn): 180000
zookeeper.znode.parent
ZooKeeper中的HBase的根ZNode。所有的HBase的ZooKeeper會(huì)用這個(gè)目錄配置相對路徑魂挂。默認(rèn)情況下钻心,所有的HBase的ZooKeeper文件路徑是用相對路徑,所以他們會(huì)都去這個(gè)目錄下面由驹。
默認(rèn): /hbase
zookeeper.znode.rootserver
ZNode 保存的 根region的路徑. 這個(gè)值是由Master來寫,client和regionserver 來讀的。如果設(shè)為一個(gè)相對地址祭椰,父目錄就是 ${zookeeper.znode.parent}.默認(rèn)情形下,意味著根region的路徑存儲(chǔ)在/hbase/root-region-server.
默認(rèn): root-region-server
zookeeper.znode.acl.parent
root znode的acl疲陕,默認(rèn)acl方淤;
hbase.coprocessor.region.classes
逗號分隔的Coprocessores列表,會(huì)被加載到默認(rèn)所有表上蹄殃。在自己實(shí)現(xiàn)了一個(gè)Coprocessor后携茂,將其添加到Hbase的classpath并加入全限定名。也可以延遲加載诅岩,由HTableDescriptor指定讳苦;
hbase.coprocessor.master.classes
由HMaster進(jìn)程加載的coprocessors带膜,逗號分隔,全部實(shí)現(xiàn)org.apache.hadoop.hbase.coprocessor.MasterObserver鸳谜,同coprocessor類似钱慢,加入classpath及全限定名;
hbase.zookeeper.quorum
Zookeeper集群的地址列表卿堂,用逗號分割束莫。例如:"host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".默認(rèn)是localhost,是給偽分布式用的。要修改才能在完全分布式的情況下使用草描。如果在hbase-env.sh設(shè)置了HBASE_MANAGES_ZK览绿,這些ZooKeeper節(jié)點(diǎn)就會(huì)和HBase一起啟動(dòng)。
默認(rèn): localhost
hbase.zookeeper.peerport
ZooKeeper節(jié)點(diǎn)使用的端口穗慕。詳細(xì)參見:http://hadoop.apache.org/zookeeper/docs/r3.1.1/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
默認(rèn): 2888
hbase.zookeeper.leaderport
ZooKeeper用來選擇Leader的端口饿敲,詳細(xì)參見:http://hadoop.apache.org/zookeeper/docs/r3.1.1/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
默認(rèn): 3888
hbase.zookeeper.useMulti
Instructs HBase to make use of ZooKeeper's multi-update functionality. This allows certain ZooKeeper operations to complete more quickly and prevents some issues with rare Replication failure scenarios (see the release note of HBASE-2611 for an example). IMPORTANT: only set this to true if all ZooKeeper servers in the cluster are on version 3.4+ and will not be downgraded. ZooKeeper versions before 3.4 do not support multi-update and will not fail gracefully if multi-update is invoked (see ZOOKEEPER-1495).
Default: false
hbase.zookeeper.property.initLimit
ZooKeeper的zoo.conf中的配置。 初始化synchronization階段的ticks數(shù)量限制
默認(rèn): 10
hbase.zookeeper.property.syncLimit
ZooKeeper的zoo.conf中的配置逛绵。 發(fā)送一個(gè)請求到獲得承認(rèn)之間的ticks的數(shù)量限制
默認(rèn): 5
hbase.zookeeper.property.dataDir
ZooKeeper的zoo.conf中的配置怀各。 快照的存儲(chǔ)位置
默認(rèn): ${hbase.tmp.dir}/zookeeper
hbase.zookeeper.property.clientPort
ZooKeeper的zoo.conf中的配置。 客戶端連接的端口
默認(rèn): 2181
hbase.zookeeper.property.maxClientCnxns
ZooKeeper的zoo.conf中的配置术浪。 ZooKeeper集群中的單個(gè)節(jié)點(diǎn)接受的單個(gè)Client(以IP區(qū)分)的請求的并發(fā)數(shù)瓢对。這個(gè)值可以調(diào)高一點(diǎn),防止在單機(jī)和偽分布式模式中出問題胰苏。
默認(rèn): 300
hbase.rest.port
HBase REST server的端口
默認(rèn): 8080
hbase.rest.readonly
定義REST server的運(yùn)行模式硕蛹。可以設(shè)置成如下的值: false: 所有的HTTP請求都是被允許的 - GET/PUT/POST/DELETE. true:只有GET請求是被允許的
默認(rèn): false
hbase.defaults.for.version.skip
Set to true to skip the 'hbase.defaults.for.version' check. Setting this to true can be useful in contexts other than the other side of a maven generation; i.e. running in an ide. You'll want to set this boolean to true to avoid seeing the RuntimException complaint: "hbase-default.xml file seems to be for and old version of HBase (${hbase.version}), this version is X.X.X-SNAPSHOT"
Default: false
是否跳過hbase.defaults.for.version的檢查硕并,默認(rèn)是false法焰;
hbase.coprocessor.abortonerror
Set to true to cause the hosting server (master or regionserver) to abort if a coprocessor throws a Throwable object that is not IOException or a subclass of IOException. Setting it to true might be useful in development environments where one wants to terminate the server as soon as possible to simplify coprocessor failure analysis.
Default: false
如果coprocessor加載失敗或者初始化失敗或者拋出Throwable對象,則主機(jī)退出倔毙。設(shè)置為false會(huì)讓系統(tǒng)繼續(xù)運(yùn)行埃仪,但是coprocessor的狀態(tài)會(huì)不一致,所以一般debug時(shí)才會(huì)設(shè)置為false陕赃,默認(rèn)是true卵蛉;
hbase.online.schema.update.enable
Set true to enable online schema changes. This is an experimental feature. There are known issues modifying table schemas at the same time a region split is happening so your table needs to be quiescent or else you have to be running with splits disabled.
Default: false
設(shè)置true來允許在線schema變更,默認(rèn)是true凯正;
hbase.table.lock.enable
Set to true to enable locking the table in zookeeper for schema change operations. Table locking from master prevents concurrent schema modifications to corrupt table state.
Default: true
設(shè)置為true來允許在schema變更時(shí)zk鎖表毙玻,鎖表可以組織并發(fā)的schema變更導(dǎo)致的表狀態(tài)不一致,默認(rèn)是true廊散;
dfs.support.append
Does HDFS allow appends to files? This is an hdfs config. set in here so the hdfs client will do append support. You must ensure that this config. is true serverside too when running hbase (You will have to restart your cluster after setting it).
Default: true
hbase.thrift.minWorkerThreads
The "core size" of the thread pool. New threads are created on every connection until this many threads are created.
Default: 16
線程池的core size桑滩,在達(dá)到這里配置的量級后,新線程才會(huì)再新的連接創(chuàng)立時(shí)創(chuàng)建,默認(rèn)是16运准;
hbase.thrift.maxWorkerThreads
The maximum size of the thread pool. When the pending request queue overflows, new threads are created until their number reaches this number. After that, the server starts dropping connections.
Default: 1000
顧名思義幌氮,最大線程數(shù),達(dá)到這個(gè)數(shù)字后胁澳,服務(wù)器開始drop連接该互,默認(rèn)是1000;
hbase.thrift.maxQueuedRequests
The maximum number of pending Thrift connections waiting in the queue. If there are no idle threads in the pool, the server queues requests. Only when the queue overflows, new threads are added, up to hbase.thrift.maxQueuedRequests threads.
Default: 1000
Thrift連接隊(duì)列的最大數(shù)韭畸,如果線程池滿宇智,會(huì)先在這個(gè)隊(duì)列中緩存請求,緩存上限就是該配置胰丁,默認(rèn)是1000随橘;
hbase.offheapcache.percentage
The amount of off heap space to be allocated towards the experimental off heap cache. If you desire the cache to be disabled, simply set this value to 0.
Default: 0
JVM參數(shù)-XX:MaxDirectMemorySize的百分比值,默認(rèn)是0锦庸,即不開啟堆外分配机蔗;
hbase.data.umask.enable
Enable, if true, that file permissions should be assigned to the files written by the regionserver
Default: false
開啟后,文件在regionserver寫入時(shí)會(huì) 有權(quán)限相關(guān)設(shè)定甘萧,默認(rèn)是false不開啟萝嘁;
hbase.data.umask
File permissions that should be used to write data files when hbase.data.umask.enable is true
Default: 000
開啟上面一項(xiàng)配置后,文件的權(quán)限umask扬卷,默認(rèn)是000
hbase.metrics.showTableName
Whether to include the prefix "tbl.tablename" in per-column family metrics. If true, for each metric M, per-cf metrics will be reported for tbl.T.cf.CF.M, if false, per-cf metrics will be aggregated by column-family across tables, and reported for cf.CF.M. In both cases, the aggregated metric M across tables and cfs will be reported.
Default: true
是否為每個(gè)指標(biāo)顯示表名前綴牙言,默認(rèn)是true;
hbase.metrics.exposeOperationTimes
Whether to report metrics about time taken performing an operation on the region server. Get, Put, Delete, Increment, and Append can all have their times exposed through Hadoop metrics per CF and per region.
Default: true
是否進(jìn)行關(guān)于操作在使用時(shí)間維度的指標(biāo)報(bào)告邀泉,比如GET PUT DELETE INCREMENT等嬉挡,默認(rèn)是true;
hbase.master.hfilecleaner.plugins
A comma-separated list of HFileCleanerDelegate invoked by the HFileCleaner service. These HFiles cleaners are called in order, so put the cleaner that prunes the most files in front. To implement your own HFileCleanerDelegate, just put it in HBase's classpath and add the fully qualified class name here. Always add the above default log cleaners in the list as they will be overwritten in hbase-site.xml.
Default: org.apache.hadoop.hbase.master.cleaner.TimeToLiveHFileCleaner
HFile的清理插件列表汇恤,逗號分隔,被HFileService調(diào)用拔恰,可以自定義因谎,默認(rèn)org.apache.hadoop.hbase.master.cleaner.TimeToLiveHFileCleaner
hbase.regionserver.catalog.timeout
Timeout value for the Catalog Janitor from the regionserver to META.
Default: 600000
regionserver的Catalog Janitor訪問META的超時(shí)時(shí)間,默認(rèn)是600000颜懊;
hbase.master.catalog.timeout
Timeout value for the Catalog Janitor from the master to META.
Default: 600000
Catalog Janitor從master到META的超時(shí)時(shí)間财岔,我們知道這個(gè)Janitor是定時(shí)的去META掃描表目錄,來決定回收無用的regions河爹,默認(rèn)是600000匠璧;
hbase.config.read.zookeeper.config
Set to true to allow HBaseConfiguration to read the zoo.cfg file for ZooKeeper properties. Switching this to true is not recommended, since the functionality of reading ZK properties from a zoo.cfg file has been deprecated.
Default: false
讓hbaseconfig去讀zk的config,默認(rèn)false咸这,也不支持開啟夷恍,這個(gè)功能很搞笑~~個(gè)人觀點(diǎn);
hbase.snapshot.enabled
Set to true to allow snapshots to be taken / restored / cloned.
Default: true
是否允許snapshot被使用媳维、存儲(chǔ)和克隆酿雪,默認(rèn)是true遏暴;
hbase.rest.threads.max
The maximum number of threads of the REST server thread pool. Threads in the pool are reused to process REST requests. This controls the maximum number of requests processed concurrently. It may help to control the memory used by the REST server to avoid OOM issues. If the thread pool is full, incoming requests will be queued up and wait for some free threads. The default is 100.
Default: 100
REST服務(wù)器線程池的最大線程數(shù),池滿的話新請求會(huì)自動(dòng)排隊(duì)指黎,限制這個(gè)配置可以控制服務(wù)器的內(nèi)存量朋凉,預(yù)防OOM,默認(rèn)是100醋安;
hbase.rest.threads.min
The minimum number of threads of the REST server thread pool. The thread pool always has at least these number of threads so the REST server is ready to serve incoming requests. The default is 2.
Default: 2
同上類似杂彭,最小線程數(shù),為了確保服務(wù)器的服務(wù)狀態(tài)吓揪,默認(rèn)是2盖灸;
摘錄二
<configuration>
<property>
<name>hbase.rpc.engine</name>
<value>org.apache.hadoop.hbase.ipc.WritableRpcEngine</value>
</property>
<property>
<name>hbase.hregion.max.filesize</name>
<value>10737418240</value>
<!--默認(rèn)值:256M:說明:在當(dāng)前ReigonServer上單個(gè)Reigon的最大存儲(chǔ)空間,單個(gè)Region超過該值時(shí)磺芭,這個(gè)Region會(huì)被自動(dòng)split成更小的region赁炎。 -->
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop01:8020/apps/hbase/data</value>
</property>
<property>
<name>hfile.block.cache.size</name>
<value>0.40</value>
<!--默認(rèn)值:0.2:說明:storefile的讀緩存占用Heap的大小百分比,0.2表示20%钾腺。該值直接影響數(shù)據(jù)讀的性能
調(diào)優(yōu):當(dāng)然是越大越好徙垫,如果寫比讀少很多,開到0.4-0.5也沒問題放棒。如果讀寫較均衡姻报,0.3左右。如果寫比讀多间螟,果斷默認(rèn)吧吴旋。
設(shè)置這個(gè)值的時(shí),同時(shí)要參考 hbase.regionserver.global.memstore.upperLimit 厢破,該值是memstore占heap的最大百分比荣瑟,
兩個(gè)參數(shù)一個(gè)影響讀,一個(gè)影響寫摩泪。如果兩值加起來超過80-90%笆焰,會(huì)有OOM的風(fēng)險(xiǎn),謹(jǐn)慎設(shè)置见坑。-->
</property>
<property>
<name>hbase.regionserver.global.memstore.upperLimit</name>
<value>0.4</value>
<!--默認(rèn)值:0.4/0.35 upperlimit說明:hbase.hregion.memstore.flush.size 這個(gè)參數(shù)的作用是當(dāng)單個(gè)Region內(nèi)所有的memstore大小總和超過指定值時(shí)嚷掠,flush該region的所有memstore。
RegionServer的flush是通過將請求添加一個(gè)隊(duì)列荞驴,模擬生產(chǎn)消費(fèi)模式來異步處理的不皆。那這里就有一個(gè)問題,當(dāng)隊(duì)列來不及消費(fèi)熊楼,產(chǎn)生大量積壓請求時(shí)霹娄,可能會(huì)導(dǎo)致內(nèi)存陡增,最壞的情況是觸發(fā)OOM。
這個(gè)參數(shù)的作用是防止內(nèi)存占用過大项棠,當(dāng)ReigonServer內(nèi)所有region的memstores所占用內(nèi)存總和達(dá)到heap的40%時(shí)悲雳,HBase會(huì)強(qiáng)制block所有的更新并flush這些region以釋放所有memstore占用的內(nèi)存。 -->
</property>
<property>
<name>hbase.regionserver.global.memstore.lowerLimit</name>
<value>0.38</value>
<!--lowerLimit說明: 同upperLimit香追,只不過lowerLimit在所有region的memstores所占用內(nèi)存達(dá)到Heap的35%時(shí)合瓢,不flush所有的memstore。它會(huì)找一個(gè)memstore內(nèi)存占用最大的region透典,做個(gè)別flush晴楔,此時(shí)寫更新還是會(huì)被block。lowerLimit算是一個(gè)在所有region強(qiáng)制flush導(dǎo)致性能降低前的補(bǔ)救措施峭咒。
在日志中税弃,表現(xiàn)為 “** Flush thread woke up with memory above low water.”
調(diào)優(yōu):這是一個(gè)Heap內(nèi)存保護(hù)參數(shù),默認(rèn)值已經(jīng)能適用大多數(shù)場景凑队。
參數(shù)調(diào)整會(huì)影響讀寫则果,如果寫的壓力大導(dǎo)致經(jīng)常超過這個(gè)閥值,則調(diào)小讀緩存hfile.block.cache.size增大該閥值漩氨,或者Heap余量較多時(shí)西壮,不修改讀緩存大小。
如果在高壓情況下叫惊,也沒超過這個(gè)閥值款青,那么建議你適當(dāng)調(diào)小這個(gè)閥值再做壓測,確保觸發(fā)次數(shù)不要太多霍狰,然后還有較多Heap余量的時(shí)候抡草,調(diào)大hfile.block.cache.size提高讀性能。-->
</property>
<property>
<name>hbase.hregion.memstore.block.multiplier</name>
<value>2</value>
<!--默認(rèn)值:2:說明:當(dāng)一個(gè)region里的memstore占用內(nèi)存大小超過hbase.hregion.memstore.flush.size兩倍的大小時(shí)蔗坯,block該region的所有請求康震,進(jìn)行flush,釋放內(nèi)存步悠。
調(diào)優(yōu): 這個(gè)參數(shù)的默認(rèn)值還是比較靠譜的签杈。如果你預(yù)估你的正常應(yīng)用場景(不包括異常)不會(huì)出現(xiàn)突發(fā)寫或?qū)懙牧靠煽兀敲幢3帜J(rèn)值即可鼎兽。
如果正常情況下,你的寫請求量就會(huì)經(jīng)常暴長到正常的幾倍铣除,那么你應(yīng)該調(diào)大這個(gè)倍數(shù)并調(diào)整其他參數(shù)值谚咬,比如hfile.block.cache.size和hbase.regionserver.global.memstore.upperLimit/lowerLimit,以預(yù)留更多內(nèi)存尚粘,防止HBase server OOM择卦。-->
</property>
<property>
<name>dfs.support.append</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>hadoop04,hadoop05,hadoop06,hadoop07</value>
</property>
<property>
<name>zookeeper.session.timeout</name>
<value>60000</value>
<!--默認(rèn): 180000 :zookeeper 會(huì)話超時(shí)時(shí)間,單位是毫秒 -->
</property>
<property>
<name>hbase.superuser</name>
<value>hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.client.keyvalue.maxsize</name>
<value>10485760</value>
<!--默認(rèn): 10485760 :一個(gè)KeyValue實(shí)例的最大size.這個(gè)是用來設(shè)置存儲(chǔ)文件中的單個(gè)entry的大小上限。因?yàn)橐粋€(gè)KeyValue是不能分割的秉继,
所以可以避免因?yàn)?數(shù)據(jù)過大導(dǎo)致region不可分割祈噪。明智的做法是把它設(shè)為可以被最大region size整除的數(shù)。如果設(shè)置為0或者更小尚辑,就會(huì)禁用這個(gè)檢查辑鲤。默認(rèn)10MB。 -->
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
<!--默認(rèn): 2181 :ZooKeeper的zoo.conf中的配置杠茬。 客戶端連接的端口 -->
</property>
<property>
<name>hbase.hstore.blockingStoreFiles</name>
<value>7</value>
<!--默認(rèn): 7 : 當(dāng)一個(gè)HStore含有多于這個(gè)值的HStoreFiles(每一個(gè)memstore flush產(chǎn)生一個(gè)HStoreFile)的時(shí)候月褥,會(huì)執(zhí)行一個(gè)合并操作,update會(huì)阻塞直到合并完成瓢喉,直到超過了hbase.hstore.blockingWaitTime的值
調(diào)優(yōu):block寫請求會(huì)嚴(yán)重影響當(dāng)前regionServer的響應(yīng)時(shí)間宁赤,但過多的storefile也會(huì)影響讀性能。從實(shí)際應(yīng)用來看栓票,為了獲取較平滑的響應(yīng)時(shí)間决左,可將值設(shè)為無限大。如果能容忍響應(yīng)時(shí)間出現(xiàn)較大的波峰波谷走贪,那么默認(rèn)或根據(jù)自身場景調(diào)整即可佛猛。-->
</property>
<property>
<name>hbase.hstore.blockingWaitTime</name>
<value>90000</value>
<!--20140314添加
默認(rèn): 90000 :hbase.hstore.blockingStoreFiles所限制的StoreFile數(shù)量會(huì)導(dǎo)致update阻塞,這個(gè)時(shí)間是來限制阻塞時(shí)間的厉斟。當(dāng)超過了這個(gè)時(shí)間挚躯,HRegion會(huì)停止阻塞update操作,不過合并還有沒有完成擦秽。默認(rèn)為90s.-->
</property>
<property>
<name>hbase.hstore.compactionThreshold</name>
<value>3</value>
<!--默認(rèn): 3 :當(dāng)一個(gè)HStore含有多于這個(gè)值的HStoreFiles(每一個(gè)memstore flush產(chǎn)生一個(gè)HStoreFile)的時(shí)候码荔,會(huì)執(zhí)行一個(gè)合并操作,把這HStoreFiles寫成一個(gè)感挥。這個(gè)值越大缩搅,需要合并的時(shí)間就越長。-->
</property>
<property>
<name>hbase.hregion.majorcompaction</name>
<value>86400000</value>
<!--默認(rèn): 86400000 :一個(gè)Region中的所有HStoreFile的major compactions的時(shí)間間隔触幼。默認(rèn)是1天硼瓣。設(shè)置為0就是禁用這個(gè)功能。-->
</property>
<property>
<name>hbase.security.authorization</name>
<value>false</value>
</property>
<property>
<name>hbase.zookeeper.useMulti</name>
<value>true</value>
</property>
<property>
<name>hbase.client.scanner.caching</name>
<value>100</value>
<!--默認(rèn): 1 :當(dāng)調(diào)用Scanner的next方法置谦,而值又不在緩存里的時(shí)候堂鲤,從服務(wù)端一次獲取的行數(shù)。越大的值意味著Scanner會(huì)快一些媒峡,但是會(huì)占用更多的內(nèi)存瘟栖。
當(dāng)緩沖被占滿的時(shí)候,next方法調(diào)用會(huì)越來越慢谅阿。慢到一定程度半哟,可能會(huì)導(dǎo)致超時(shí)酬滤。例如超過了 hbase.regionserver.lease.period。 -->
</property>
<property>
<name>hbase.defaults.for.version.skip</name>
<value>true</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase-unsecure</value>
</property>
<property>
<name>hbase.hregion.memstore.flush.size</name>
<value>134217728</value>
<!--默認(rèn): 67108864 :當(dāng)memstore的大小超過這個(gè)值的時(shí)候寓涨,會(huì)flush到磁盤盯串。這個(gè)值被一個(gè)線程每隔hbase.server.thread.wakefrequency檢查一下。-->
</property>
<property>
<name>hbase.regionserver.handler.count</name>
<value>60</value>
<!--默認(rèn): 10 :RegionServers受理的RPC Server實(shí)例數(shù)量戒良。對于Master來說体捏,這個(gè)屬性是Master受理的handler數(shù)量.-->
</property>
<property>
<name>hbase.hregion.memstore.mslab.enabled</name>
<value>true</value>
<!--默認(rèn): false :體驗(yàn)特性:啟用memStore分配本地緩沖區(qū)。這個(gè)特性是為了防止在大量寫負(fù)載的時(shí)候堆的碎片過多蔬墩。這可以減少GC操作的頻率译打。
說明:減少因內(nèi)存碎片導(dǎo)致的Full GC,提高整體性能拇颅。-->
</property>
<property>
<name>hbase.security.authentication</name>
<value>simple</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>/var/log/hbase</value>
</property>
<property>
<name>hbase.master.info.bindAddress</name>
<value>hadoop03</value>
<description>Enter the HBase Master server hostname</description>
</property>
</configuration>