Skip to content

Commit

Permalink
add logs when unexpected paths are found
Browse files Browse the repository at this point in the history
  • Loading branch information
jt2594838 committed Mar 16, 2020
1 parent 8014089 commit f4428ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -152,7 +152,6 @@ private void pathsMergeOneFile(int seqFileIdx, IPointReader[] unseqReaders)
TsFileResource currTsFile = resource.getSeqFiles().get(seqFileIdx);
String deviceId = currMergingPaths.get(0).getDevice();
Long currDeviceMinTime = currTsFile.getStartTimeMap().get(deviceId);
//COMMENTS: is this correct? how about if there are other devices (in the currMergingPaths) that have unseq data?
if (currDeviceMinTime == null) {
return;
}
Expand Down
Expand Up @@ -397,6 +397,7 @@ public void filterChunks(Map<Path, List<Long>> chunkStartTimes) {
Map<Path, Integer> startTimeIdxes = new HashMap<>();
chunkStartTimes.forEach((p, t) -> startTimeIdxes.put(p, 0));

boolean pathsShown = false;
Iterator<ChunkGroupMetaData> chunkGroupMetaDataIterator = chunkGroupMetaDataList.iterator();
while (chunkGroupMetaDataIterator.hasNext()) {
ChunkGroupMetaData chunkGroupMetaData = chunkGroupMetaDataIterator.next();
Expand All @@ -410,6 +411,10 @@ public void filterChunks(Map<Path, List<Long>> chunkStartTimes) {
Integer startTimeIdx = startTimeIdxes.get(path);
if (startTimeIdx == null) {
logger.error("Unexpected timeseries {} found in file {}", path, file);
if (!pathsShown) {
logger.error("Merged timeseries in file {} are {}", file, startTimeIdxes.keySet());
pathsShown = true;
}
continue;
}

Expand Down

0 comments on commit f4428ed

Please sign in to comment.