public void readValuesFrom(ObjectInputStream ois) throws IOException, ClassNotFoundException, TeiidComponentException { long size = ois.readLong(); int sizeHint = this.getExpectedHeight(size); batchInsert = true; while (this.getRowCount() < size) { List<List<Object>> batch = BatchSerializer.readBatch(ois, leafManager.getTypes()); for (List list : batch) { this.insert(list, InsertMode.ORDERED, sizeHint); } } batchInsert = false; }
public void readValuesFrom(ObjectInputStream ois) throws IOException, ClassNotFoundException, TeiidComponentException { long size = ois.readLong(); int sizeHint = this.getExpectedHeight(size); batchInsert = true; while (this.getRowCount() < size) { List<List<Object>> batch = BatchSerializer.readBatch(ois, leafManager.getTypes()); for (List list : batch) { this.insert(list, InsertMode.ORDERED, sizeHint); } } batchInsert = false; }
public void readValuesFrom(ObjectInputStream ois) throws IOException, ClassNotFoundException, TeiidComponentException { long size = ois.readLong(); int sizeHint = this.getExpectedHeight(size); batchInsert = true; while (this.getRowCount() < size) { List<List<Object>> batch = BatchSerializer.readBatch(ois, leafManager.getTypes()); for (List list : batch) { this.insert(list, InsertMode.ORDERED, sizeHint); } } batchInsert = false; }
List<?> lastTuple = null; boolean sortedDistinct = sorted && !state.isExpresssionDistinct(); int sizeHint = index.getExpectedHeight(state.getRowCount()); index.setBatchInsert(sorted); outer: while (its.hasNext()) {
List<?> lastTuple = null; boolean sortedDistinct = sorted && !state.isExpresssionDistinct(); int sizeHint = index.getExpectedHeight(state.getRowCount()); index.setBatchInsert(sorted); outer: while (its.hasNext()) {
List<?> lastTuple = null; boolean sortedDistinct = sorted && !state.isExpresssionDistinct(); int sizeHint = index.getExpectedHeight(state.getRowCount()); index.setBatchInsert(sorted); outer: while (its.hasNext()) {
@Test public void testUnOrderedInsert() throws TeiidComponentException { BufferManagerImpl bm = BufferManagerFactory.createBufferManager(); bm.setProcessorBatchSize(16); ElementSymbol e1 = new ElementSymbol("x"); e1.setType(Integer.class); List elements = Arrays.asList(e1); STree map = bm.createSTree(elements, "1", 1); int size = (1<<16)+(1<<4)+1; int logSize = map.getExpectedHeight(size); for (int i = 0; i < size; i++) { assertNull(map.insert(Arrays.asList(i), InsertMode.NEW, logSize)); assertEquals(i + 1, map.getRowCount()); } assertTrue(5 >= map.getHeight()); }