org.apache.hadoop.hbase.HConstants
默认项 | 默认值值 | 备注 |
---|
编码方式 | UTF-8 | |
默认block大小 | 64kb | HFile’s default size |
key | 含义 | 默认值 |
---|
hbase.zookeeper.recoverable.waittime | zookeeper恢复的等待时间 | 10000 |
hbase.zookeeper.property.maxClientCnxns | zookeeper并发连接限制 | 300 |
zookeeper.session.timeout | zookeeper会话超时时间 | 180 * 1000 |
hbase.zookeeper.useMulti | 是否使用ZK的multi-update操作(多个原子操作合并,保证结果的一致性) | false |
hbase.regionserver.port | region server监听端口 | 60020 |
hbase.regionserver.info.port | 默认的regionserverin信息端口 | 60030 |
hbase.server.thread.wakefrequency | 线程唤醒频率 | 10 * 1000 |
hbase.server.versionfile.writeattempts | 多久写入版本文件,失败前 | 3 |
hbase.hstore.compaction.kv.max | 批量flush/compaction的最大KV数 | 10 |
hbase.client.ipc.pool.type | Hbase客户端IPC Pool类型 | PoolType.RoundRobin(循环) |
hbase.client.ipc.pool.size | Hbase客户端IPC Pool大小 | 1 |
hbase.client.operation.timeout | Hbase客户端操作超时时间(覆盖RPC超时时间) | Integer.MAX_VALUE |
hbase.client.meta.operation.timeout | Hbase客户端操作超时时间(覆盖RPC超时时间) | Integer.MAX_VALUE |
hbase.hregion.max.filesize | 切分的region最大文件大小 | 10 * 1024 * 1024 * 1024 |
hbase.hstore.open.and.close.threads.max | 打开/关闭存储或并行存储的线程数 | 1 |
hbase.hregion.edits.replay.skip.errors | 跳过错误重编辑 | false |
hbase.client.scanner.max.result.size | scan最大的字节数 | Long.MAX_VALUE |
hbase.client.pause | 一次get失败或region搜寻之后客户端暂停时间(失败睡眠时间) | 100 |
hbase.client.max.total.tasks | 客户端维护的最大并发连接 | 100 |
hbase.client.max.perserver.tasks | 客户端对于一个regionserver维护的最大并发连接 | 2 |
hbase.client.max.perregion.tasks | 客户端对于一个region维护的最大并发连接 | 1 |
hbase.server.pause | 失败操作后的重试等待时间 | 1000 |
hbase.client.retries.number | 客户端重试次数 | 31 |
hbase.client.prefetch.limit | 预取的region个数限制 | 10 |
hbase.client.scanner.caching | 所有客户端的默认scan缓存行数rows | 100 |
hbase.meta.scanner.caching | 元数据表(hbase:meta)的scan缓存行数rows | 100 |
hbase.client.scanner.timeout.period | 客户端scan超时时间 | 60000 ms |
hbase.rpc.timeout | hbase rpc超时时间 | 60000 |
hbase.rpc.shortoperation.timeout | rpc短操作超时时间 | 10000 |
hbase.client.write.buffer | 客户端写入数据缓冲区 | 2097152≈2M |
hbase.client.keyvalue.maxsize | 客户端最长的keyvalue值 | -1(不限制) |
hbase.ipc.client.connection.maxidletime | 客户端连接最大空闲时间 | 10000(10s) |
hbase.ipc.client.connect.max.retries | 客户端连接最大重试次数 | 0 |
hbase.ipc.client.tcpnodelay | tcp无延迟 | true |
hbase.ipc.client.tcpkeepalive | tcp保活 | true |
ipc.ping.interval | 客户端ping频率 | 60000(1 min) |
ipc.socket.timeout | 发起连接超时时间 | 20000(20s) |
我们系统在生产上的配置如下,仅供参考
Configuration configuration = new Configuration();
configuration.set("hbase.zookeeper.quorum", quorum);
configuration.set("hbase.client.scanner.caching", "500");// 所有客户端的默认scan缓存时间, 默认100
configuration.set("hbase.client.pause", "50");// 失败重试时等待时间, 默认100
configuration.set("hbase.rpc.timeout", "2000");// 一次RPC请求的超时时间, 默认60000
configuration.set("hbase.client.operation.timeout", "3000");// 客户端发起一次数据操作直至得到响应之间总的超时时间, 默认Integer.MAX_VALUE(一次阻塞操作)
configuration.set("hbase.client.retries.number", "3");// 重试次数3次,默认31