![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hbase/Phoenix
文章平均质量分 77
qq_26182553
这个作者很懒,什么都没留下…
展开
-
Phoenix安装
1. download wget https://mirrors.tuna.tsinghua.edu.cn/apache/phoenix/apache-phoenix-4.11.0-HBase-1.2/bin/apache-phoenix-4.11.0-HBase-1.2-bin.tar.gz tar -zxvf apache-phoenix-4.11.0-HBase-1.2-bin.tar原创 2017-07-13 11:38:04 · 745 阅读 · 0 评论 -
Hbase API操作优化
一. put 优化 Hbase的API配备了一个客户端的写缓冲区(write buffer),缓冲区负责收集put操作,然后调用PRC操作一次性将put送往服务器。默认情况下写缓冲区是禁用的,可以调用table.setAutoFlush(false)来激活缓冲区: @Test public void testWriteBuffer() throws Exception{ HTab原创 2017-07-13 11:28:11 · 246 阅读 · 0 评论 -
Hbase region切片 reqion切片合并操作
查看Hbase表分区情况 scan 'hbase:meta' t1,,1487821235337.353a385f28af52ed47e675f18242bbf8. column=info:regioninfo, timestamp=1487821236518, value={ENCODED => 353a385f28af52ed47e675f18242bbf8, NAME =>原创 2017-07-13 11:27:42 · 1125 阅读 · 0 评论 -
Hbase 性能优化
1. 垃圾回收优化 用户可以通过向hbase-env.sh文件中添加HBASE_OPTS或者HBASE_REGIONSERVER_OPT来设置垃圾回收相关选项,后者仅仅影响region服务器进程,也是推荐的修改方式。 增加新生代大小, 减小新生代垃圾回收次数 -XX:MaxNewSize=8g -XX:NewSize=8g 修改垃圾回收策略 -XX:+UseParNewGC原创 2017-07-13 11:30:17 · 192 阅读 · 0 评论 -
hbase 管理工具
split 拆分merge_region 合并分区 flush 将memstore中的数据强制写入磁盘 hbase> flush 'TABLENAME' hbase> flush 'REGIONNAME' hbase> flush 'ENCODE_REGIONNAME' move将region移动到一个指定的region server, 或者移动到一个随机的region server(原创 2017-07-13 11:30:02 · 1538 阅读 · 0 评论 -
Hbase coprocesser协处理器
的神色原创 2017-07-13 11:29:53 · 441 阅读 · 0 评论 -
Hbase counter计数器
创建表名和列族名 create 't1','cf' 初始化counter为1 或 让counter+1 incr 't1','row1','cf:no',1 获取counter get 't1','row1','cf:no' 获取counter get_counter 't1','row1','cf:no' @Test public void tes原创 2017-07-13 11:29:46 · 1089 阅读 · 0 评论 -
hbase-- Fully Distributed Install
NodeName Master ZooKeeper RegionServer centos1 yes yes no centos2 backup yes yes centos3 no yes yes 1. config原创 2017-07-13 11:38:19 · 181 阅读 · 0 评论 -
Phoenix常见用法
1. Load Data into Phoenix Using our map-reduce based CSV loader for bigger data sets http://phoenix.apache.org/bulk_dataload.html hadoop jar phoenix--client.jar org.apache.phoenix.mapreduce.Cs原创 2017-07-13 11:38:34 · 439 阅读 · 0 评论 -
Hbase原子性操作
1. 使用检查写(check and put)可以保证操作的原子性。即执行put前先检查数值是否与提供的value一致,如果检查通过就执行put,否则就放弃。如果需要put前该字段值不存在,将value设置成null即可。 @Test public void testCheckPut() throws Exception{ Table table = conn.getTable(T原创 2017-07-13 11:28:18 · 599 阅读 · 0 评论