@Test public void buildIndexViaTreeMap() throws Exception { PerformancePlugManager performancePlugManager = PerformancePlugManager.getInstance(); when(performancePlugManager.isDiskSort()).thenReturn(false); TreeMap<Long, IntList> map = spy(new TreeMap<Long, IntList>()); whenNew(TreeMap.class).withAnyArguments().thenReturn(map); new ColumnIndexer<Object>(new ColumnKey("column"), Collections.singletonList(seg)).buildIndex(); verify(detailColumn).get(0); verify(detailColumn).get(2); verify(detailColumn).get(3); verify(map).put(eq(1L), ArgumentMatchers.<IntList>any()); verify(map).put(eq(3L), ArgumentMatchers.<IntList>any()); verify(dictColumn.putter()).putValue(0, null); verify(dictColumn.putter()).putValue(1, 1L); verify(dictColumn.putter()).putValue(2, 3L); verify(dictColumn.putter()).putIndex(0, 1); verify(dictColumn.putter()).putIndex(1, 0); verify(dictColumn.putter()).putIndex(2, 2); verify(dictColumn.putter()).putIndex(3, 1); verify(dictColumn.putter()).putSize(3); }
@Override public void buildIndex() throws Exception { for (Segment segment : segments) { try { Column<T> column = getColumn(segment); buildColumnIndex(column, segment.getRowCount()); } finally { SegmentUtils.releaseHisSeg(segment); } } }
ColumnIndexer implements SwiftColumnIndexer { @Override public void buildIndex() throws Exception { for (Segment segment : segments) { try { Column<T> column = getColumn(segment); buildColumnIndex(column, segment.getRowCount()); } finally { SegmentUtils.releaseHisSeg(segment); } } } }
ColumnIndexer implements SwiftColumnIndexer { @Override public void buildIndex() throws Exception { for (Segment segment : segments) { try { Column<T> column = getColumn(segment); buildColumnIndex(column, segment.getRowCount()); } finally { SegmentUtils.releaseHisSeg(segment); } } } ColumnIndexer(ColumnKey key, List<Segment> segments); }
ColumnIndexer implements SwiftColumnIndexer { @Override public void buildIndex() throws Exception { for (Segment segment : segments) { try { Column<T> column = getColumn(segment); buildColumnIndex(column, segment.getRowCount()); } finally { SegmentUtils.releaseHisSeg(segment); } } } ColumnIndexer(ColumnKey key, List<Segment> segments); @Override void buildIndex(); }
ColumnIndexer implements SwiftColumnIndexer { @Override public void buildIndex() throws Exception { for (Segment segment : segments) { try { Column<T> column = getColumn(segment); buildColumnIndex(column, segment.getRowCount()); } finally { SegmentUtils.releaseHisSeg(segment); } } } ColumnIndexer(ColumnKey key, List<Segment> segments); @Override void buildIndex();  }