@Test public void testOver2GFile() throws Exception { TestUtils.assertMemoryLeak(() -> { try (TableModel model = new TableModel(configuration, "x", PartitionBy.NONE) .col("a", ColumnType.INT)) { CairoTestUtils.create(model); } long N = 280000000; Rnd rnd = new Rnd(); try (TableWriter writer = new TableWriter(configuration, "x")) { for (int i = 0; i < N; i++) { TableWriter.Row r = writer.newRow(); r.putLong(0, rnd.nextLong()); r.append(); } writer.commit(); } try (TableReader reader = new TableReader(configuration, "x")) { int count = 0; rnd.reset(); RecordCursor cursor = reader.getCursor(); final Record record = cursor.getRecord(); while (cursor.hasNext()) { Assert.assertEquals(rnd.nextLong(), record.getLong(0)); count++; } Assert.assertEquals(N, count); } }); }
public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } TableReader(CairoConfiguration configuration, CharSequence tableName); }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } TableReader(CairoConfiguration configuration, CharSequence tableName); static int getPrimaryColumnIndex(int base, int index); double avgDouble(int columnIndex); @Override void close(); void closeColumnForRemove(int columnIndex); void closeColumnForRemove(CharSequence columnName); long floorToPartitionTimestamp(long timestamp); BitmapIndexReader getBitmapIndexReader(int columnBase, int columnIndex, int direction); int getColumnBase(int partitionIndex); TableReaderRecordCursor getCursor(); long getDataVersion(); long getMaxTimestamp(); RecordMetadata getMetadata(); long getMinTimestamp(); long getPageAddressAt(int partitionIndex, long row, int columnIndex); long getPageValueCount(int partitionIndex, long rowLo, long rowHi, int columnIndex); int getPartitionCount(); int getPartitionCountBetweenTimestamps(long partitionTimestamp1, long partitionTimestamp2); int getPartitionedBy(); SymbolMapReader getSymbolMapReader(int columnIndex); String getTableName(); long getVersion(); boolean isOpen(); double maxDouble(int columnIndex); double minDouble(int columnIndex); boolean reload(); void reshuffleSymbolMapReaders(long pTransitionIndex); long size(); double sumDouble(int columnIndex); ReadOnlyColumn getColumn(int absoluteIndex); long getColumnTop(int base, int columnIndex); long openPartition(int partitionIndex); }
TableReader implements Closeable { public TableReaderRecordCursor getCursor() { recordCursor.toTop(); return recordCursor; } TableReader(CairoConfiguration configuration, CharSequence tableName); static int getPrimaryColumnIndex(int base, int index); double avgDouble(int columnIndex); @Override void close(); void closeColumnForRemove(int columnIndex); void closeColumnForRemove(CharSequence columnName); long floorToPartitionTimestamp(long timestamp); BitmapIndexReader getBitmapIndexReader(int columnBase, int columnIndex, int direction); int getColumnBase(int partitionIndex); TableReaderRecordCursor getCursor(); long getDataVersion(); long getMaxTimestamp(); RecordMetadata getMetadata(); long getMinTimestamp(); long getPageAddressAt(int partitionIndex, long row, int columnIndex); long getPageValueCount(int partitionIndex, long rowLo, long rowHi, int columnIndex); int getPartitionCount(); int getPartitionCountBetweenTimestamps(long partitionTimestamp1, long partitionTimestamp2); int getPartitionedBy(); SymbolMapReader getSymbolMapReader(int columnIndex); String getTableName(); long getVersion(); boolean isOpen(); double maxDouble(int columnIndex); double minDouble(int columnIndex); boolean reload(); void reshuffleSymbolMapReaders(long pTransitionIndex); long size(); double sumDouble(int columnIndex); ReadOnlyColumn getColumn(int absoluteIndex); long getColumnTop(int base, int columnIndex); long openPartition(int partitionIndex);  }