Gle*_*ven 2 python graphite whisper
我正在尝试使用whisper-merge来合并2个wsp文件.它们具有相同的保留策略,一个只有比另一个更旧的数据.
当我跑步时,whisper-merge oldfile.wsp newfile.wsp我得到这个错误
Traceback (most recent call last):
File "/usr/local/src/whisper-0.9.12/bin/whisper-merge.py", line 32, in <module>
whisper.merge(path_from, path_to)
File "/usr/local/lib/python2.7/dist-packages/whisper.py", line 821, in merge
(timeInfo, values) = fetch(path_from, fromTime, untilTime)
TypeError: 'NoneType' object is not iterable
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
这是2个文件的元数据输出:
对于包含多个归档的文件,whisper.py中的第812行被破坏. https://github.com/graphite-project/whisper/blob/0.9.12/whisper.py#L812
fromTime = int(time.time()) - headerFrom['maxRetention']
Run Code Online (Sandbox Code Playgroud)
要在第813行之后立即修复,请根据存档保留时间分配fromTime. https://github.com/graphite-project/whisper/blob/0.9.12/whisper.py#L813
for archive in archives: # this line already exists
fromTime = int(time.time()) - archive['retention'] # add this line
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1748 次 |
| 最近记录: |