Skip to content

Commit

Permalink
Show fewer warnings in #35
Browse files Browse the repository at this point in the history
(cherry picked from commit 798bbd1)
  • Loading branch information
iromeo committed Mar 12, 2018
1 parent 4c31d6d commit a2d2905
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/kotlin/org/jetbrains/bio/big/RTreeIndex.kt
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,17 @@ internal class RTreeIndex(val header: RTreeIndex.Header) {
blockSize: Int): List<List<Interval>> {
var intervals = leaves.map { it.interval }
if (LOG.isEnabledFor(Level.WARN)) {
var containsIntersectedIntervalse = false
for (i in 1 until intervals.size) {
if (intervals[i] intersects intervals[i - 1]) {
LOG.warn("R+ tree leaves are overlapping: " +
containsIntersectedIntervalse = true
LOG.debug("R+ tree leaves are overlapping: " +
"${intervals[i]} ^ ${intervals[i - 1]}")
}
}
if (containsIntersectedIntervalse) {
LOG.warn("Some R+ tree leaves are overlapping. Queries might be not efficient.")
}
}

val levels = arrayListOf(intervals)
Expand Down

0 comments on commit a2d2905

Please sign in to comment.