OPENTSDB: Request failed: Internal Server Error net.opentsdb.core.IllegalDataException

今天Opentsdb补传历史数据的时候,出现了如下的错误:
Request failed: Internal Server Error net.opentsdb.core.IllegalDataException:Duplicate timestamp for key=[68, -110, -13, 90, 60, -97, 96, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 95, 0, 0, 3, 0, 0, 4], ms_offset=1356000, older=[66, -41, -21, -63], newer=[66, -41, -21, -60]; set tsd.storage.fix_duplicates=true to fix automatically or run Fsck
其实这个错误提示已经非常的明显了,就是在Opentsdb的配置文件opentsdb.conf当中,追加上这个配置条件tsd.storage.fix_duplicates=true即可,如下图所示:
 
这样我们就可以替换重复的数据,Opentsdb可以重新使用,但是这个配置文件是什么意思呢,官网上说这个配置文件的意思是:
Whether or not to accept the last written value when parsing data points with duplicate timestamps. When enabled in conjunction with compactions, a compacted column will be written with the latest data points.
这句话的意思是当同一个时间点有多个值得时候,是否接受最后一个解析数据点的数据,当启用这个fix_duplicates配置的时候,这个列将采用最是的点位这个时间点的值。然后这个配置默认为false,所以我们需要开启这个点。
所以,当我们出现错误时,一定要学会去看提示+官网,百分之80问题可以迎刃而解~

猜你喜欢

转载自www.cnblogs.com/wjcoding/p/11690121.html