org.apache.hadoop.hbase.io.hfile
Class HFileReaderV1.AbstractScannerV1
java.lang.Object
org.apache.hadoop.hbase.io.hfile.AbstractHFileReader.Scanner
org.apache.hadoop.hbase.io.hfile.HFileReaderV1.AbstractScannerV1
- All Implemented Interfaces:
- HFileScanner
- Direct Known Subclasses:
- HFileReaderV1.ScannerV1
- Enclosing class:
- HFileReaderV1
protected abstract static class HFileReaderV1.AbstractScannerV1
- extends AbstractHFileReader.Scanner
Field Summary |
protected int |
currBlock
|
protected HFileReaderV1 |
reader
This masks a field with the same name in the superclass and saves us the
runtime overhead of casting from abstract reader to reader V1. |
Method Summary |
protected abstract int |
blockSeek(byte[] key,
int offset,
int length,
boolean seekBefore)
Within a loaded block, seek looking for the first key
that is smaller than (or equal to?) the key we are interested in. |
protected abstract void |
loadBlock(int bloc,
boolean rewind)
|
int |
reseekTo(byte[] key,
int offset,
int length)
|
boolean |
seekBefore(byte[] key,
int offset,
int length)
|
int |
seekTo(byte[] key,
int offset,
int length)
|
currBlock
protected int currBlock
reader
protected HFileReaderV1 reader
- This masks a field with the same name in the superclass and saves us the
runtime overhead of casting from abstract reader to reader V1.
HFileReaderV1.AbstractScannerV1
public HFileReaderV1.AbstractScannerV1(HFileReaderV1 reader,
boolean cacheBlocks,
boolean pread,
boolean isCompaction)
blockSeek
protected abstract int blockSeek(byte[] key,
int offset,
int length,
boolean seekBefore)
- Within a loaded block, seek looking for the first key
that is smaller than (or equal to?) the key we are interested in.
A note on the seekBefore - if you have seekBefore = true, AND the
first key in the block = key, then you'll get thrown exceptions.
- Parameters:
key
- to findseekBefore
- find the key before the exact match.
- Returns:
loadBlock
protected abstract void loadBlock(int bloc,
boolean rewind)
throws IOException
- Throws:
IOException
seekTo
public int seekTo(byte[] key,
int offset,
int length)
throws IOException
- Throws:
IOException
reseekTo
public int reseekTo(byte[] key,
int offset,
int length)
throws IOException
- Throws:
IOException
seekBefore
public boolean seekBefore(byte[] key,
int offset,
int length)
throws IOException
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.