Class ScanningSnapshotReader
java.lang.Object
io.datarouter.filesystem.snapshot.reader.ScanningSnapshotReader
public class ScanningSnapshotReader extends Object
Thread-safe
The parallel operations perform the potentially high-latency block fetches
The blocks are passed to the parent scanner which parses them. The parsing could potentially be done in the parallel
section, but it would result in more objects being allocated at the same time. The parsing of the blocks is pretty
inexpensive, so this version leaves that for the parent reader thread.
-
Constructor Summary
Constructors Constructor Description ScanningSnapshotReader(SnapshotKey snapshotKey, ExecutorService exec, int numThreads, BlockLoader blockLoader) -
Method Summary
Modifier and Type Method Description io.datarouter.scanner.Scanner<SnapshotRecord>scan(int fromRecordIdInclusive)io.datarouter.scanner.Scanner<byte[]>scanColumnValues(int column)io.datarouter.scanner.Scanner<byte[]>scanKeys()io.datarouter.scanner.Scanner<SnapshotLeafRecord>scanLeafRecords(byte[] startKey, boolean inclusive)io.datarouter.scanner.Scanner<SnapshotLeafRecord>scanLeafRecords(long fromRecordIdInclusive)io.datarouter.scanner.Scanner<byte[]>scanValues()
-
Constructor Details
-
ScanningSnapshotReader
public ScanningSnapshotReader(SnapshotKey snapshotKey, ExecutorService exec, int numThreads, BlockLoader blockLoader)
-
-
Method Details
-
scanLeafRecords
public io.datarouter.scanner.Scanner<SnapshotLeafRecord> scanLeafRecords(long fromRecordIdInclusive) -
scanLeafRecords
public io.datarouter.scanner.Scanner<SnapshotLeafRecord> scanLeafRecords(byte[] startKey, boolean inclusive) -
scanKeys
public io.datarouter.scanner.Scanner<byte[]> scanKeys() -
scanValues
public io.datarouter.scanner.Scanner<byte[]> scanValues() -
scanColumnValues
public io.datarouter.scanner.Scanner<byte[]> scanColumnValues(int column) -
scan
-