Hi,

Q1: you change the order of Chunks in a TsFile. Does that break the
time-ordering characteristic?

Q2: Do you mean handling time series one by one (An unseq file may consists
of many devices and measurements)?  Do we need to make some marks on an
unseq file if only the data of a part of devices are merged?

Best.
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院


江天 <jt2594...@163.com> 于2019年7月8日周一 下午3:49写道:

> I have worked out a simple solution of merge, the following picture
> explains the basic procedure of a merge, if you cannot see the picture,
> please visit
> http://assets.processon.com/chart_image/5d22a081e4b0878e40a8a4ae.png. The
> procedure consists of 6 steps:
> 1. Build a MergeReader over the unsequential files.
> 2. Read data from the MergeReader by time-ascending order.
> 3. For each unsequential data point, find its corresponding chunk in
> sequential file.
> 4. Merge unsequantial data points with its corresponding sequential chunk
> to generate a new chunk in a new file.
> 5.1 If unmerged chunks are the minority, append unmerged chunks to the new
> file and generate metadata for it.
> 5.2 If merged chunks are the minority, remove metadata in the old file,
> append merged chunks to the old file and re-generate metadata for it,
> ignoring the chunks that have been merged in the old file.
> 6. Use the new file to replace the old file and remove useless files.
>
>
>
>

Reply via email to