public class ServerStore extends voldemort.store.cachestore.voldeimpl.StoreIterator implements MRIterator
Modifier and Type | Field and Description |
---|---|
protected int |
BLOCK_SIZE |
protected long |
dataOffset |
protected long |
keyOffset |
protected Lock |
lock |
Constructor and Description |
---|
ServerStore(String filename) |
ServerStore(String filename,
boolean flag) |
Modifier and Type | Method and Description |
---|---|
List<Integer> |
findTotal2BatchSize() |
List<Long> |
findTotalBlock() |
String |
getFilename() |
boolean |
isEnd(int last) |
protected voldemort.utils.Pair<byte[],byte[]> |
next(int current,
ByteBuffer buf) |
List<voldemort.utils.Pair<byte[],byte[]>> |
nextBlock(int begin,
int size) |
protected boolean |
populate(byte[] keys,
voldemort.store.cachestore.Value<byte[]> value) |
void |
setCurrent(int current)
curRecord is 0 base, so set it by current -1
if you use 1 base
|
void |
writeExistBlock(voldemort.store.cachestore.CacheBlock<byte[]> block) |
boolean |
writeRecord(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value<byte[]> value,
int recordNo) |
close, deleteRecord, findChannel, getCurRecord, getTotalRecord, hasNext, init, isDeleted, next, nextKeyValue, readChannel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, hasNext, next
protected volatile long dataOffset
protected volatile long keyOffset
protected Lock lock
protected final int BLOCK_SIZE
public ServerStore(String filename)
public ServerStore(String filename, boolean flag)
public List<voldemort.utils.Pair<byte[],byte[]>> nextBlock(int begin, int size)
begin
- of record no, it is zero basedsize
- public void setCurrent(int current)
setCurrent
in interface MRIterator
current
- public boolean isEnd(int last)
isEnd
in interface MRIterator
public String getFilename()
getFilename
in interface MRIterator
public boolean writeRecord(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value<byte[]> value, int recordNo) throws Exception
Exception
protected boolean populate(byte[] keys, voldemort.store.cachestore.Value<byte[]> value)
public void writeExistBlock(voldemort.store.cachestore.CacheBlock<byte[]> block) throws IOException
IOException
protected voldemort.utils.Pair<byte[],byte[]> next(int current, ByteBuffer buf) throws IOException
IOException
public List<Integer> findTotal2BatchSize()
Copyright © 2016. All rights reserved.