大数据全系列 教程
1869个小节阅读:467k
目录
408考研
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
###5.3 通话记录压缩
准备工作:
A. 删除对应表中的数据:2.76MB
xxxxxxxxxx
hbase(main):008:0> truncate 'itbaizhan:phone_log'
Truncating 'itbaizhan:phone_log' table (it may take a while):
Disabling table...
Truncating table...
Took 3.7499 seconds
hbase(main):009:0> scan 'itbaizhan:phone_log'
ROW COLUMN+CELL 0 row(s)
Took 0.6325 seconds
hbase(main):010:0> flush 'itbaizhan:phone_log'
Took 0.3706 seconds
浏览器访问HDFS该表下无内容了:
B. 执行insert()方法
xxxxxxxxxx
[root@node2 hadoop]# hbase hfile -p -f /hbase_ha/data/itbaizhan/phone_log/e1e7c3982565c7d68bcb3addaea11280/basic/90b21a3e054044abbb670e0a47aa7391
C. 将结果提交到HDFS:hbase(main):008:0> flush "itbaizhan:phone_log"
D. 查看文件大小:2.88M
安装 Google Protocol Buffer
在网站 https://github.com/protocolbuffers/protobuf/releases上可以下载 Protobuf 的源代码。然后解压编译安装便可以使用它了。