Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use SnapTreeMap instead of ConcurrentSkipListMap #6719

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions processing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
<artifactId>checker</artifactId>
<version>${checkerframework.version}</version>
</dependency>
<dependency>
<groupId>edu.stanford.ppl</groupId>
<artifactId>snaptree</artifactId>
<version>0.1</version>
</dependency>

<!-- Tests -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.google.common.collect.Maps;
import com.google.common.primitives.Ints;
import com.google.common.primitives.Longs;
import edu.stanford.ppl.concurrent.SnapTreeMap;
import org.apache.druid.collections.NonBlockingPool;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.common.guava.GuavaUtils;
Expand Down Expand Up @@ -91,7 +92,6 @@
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
Expand Down Expand Up @@ -1251,7 +1251,7 @@ static class RollupFactsHolder implements FactsHolder
{
this.sortFacts = sortFacts;
if (sortFacts) {
this.facts = new ConcurrentSkipListMap<>(incrementalIndexRowComparator);
this.facts = new SnapTreeMap<>(incrementalIndexRowComparator);
} else {
this.facts = new ConcurrentHashMap<>();
}
Expand Down Expand Up @@ -1348,7 +1348,7 @@ public PlainFactsHolder(boolean sortFacts, Comparator<IncrementalIndexRow> incre
{
this.sortFacts = sortFacts;
if (sortFacts) {
this.facts = new ConcurrentSkipListMap<>();
this.facts = new SnapTreeMap<>();
} else {
this.facts = new ConcurrentHashMap<>();
}
Expand Down