pinpoint的Hbase数据库的数据优化

pinpoint的Hbase数据库的数据优化

写的原因:
因为是测试服务器,在运行测试项目时,需要日志的打印输出,由于发现磁盘空间不足,想删除些东西,释放空间,然后发现pinpoint服务的Hbase数据库占据了18G空间,其中TraceV2表占据了13G。

解决的方法:
进入Hbase数据库后,使用desc 'TraceV2' 看了TraceV2的表结构,他的一个TTL值默认是60 DAY(这是我按照pinpoint的官方默认表结构),意思是保留60天内的记录,超出后才清理。我就寻思想把这个记录保留时间变为3 DAY。

我写了一个hbase,shell命令文本,是把这里边的表都改为3 day
bin/hbase shell test.hbase

以下是test.habse文本内容。
cat test.hbase

disable 'AgentInfo'
disable 'AgentLifeCycle'
disable 'AgentStatV2'
disable 'ApiMetaData'
disable 'ApplicationIndex'
disable 'ApplicationMapStatisticsCallee_Ver2'
disable 'ApplicationMapStatisticsCaller_Ver2'
disable 'ApplicationMapStatisticsSelf_Ver2'
disable 'ApplicationStatAggre'
disable 'ApplicationTraceIndex'
disable 'HostApplicationMap_Ver2'
disable 'SqlMetaData_Ver2'
disable 'StringMetaData'
disable 'TraceV2'


alter 'AgentEvent',{NAME => 'E',TTL => '2592
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值