|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.store.readonly.chunk.ChunkedFileSet
public class ChunkedFileSet
A set of chunked data and index files for a read-only store
Nested Class Summary | |
---|---|
static class |
ChunkedFileSet.ROCollidedEntriesIterator
Iterator over top 8 bytes of md5(key) and all collided entries ( including the number of entries ) Works only for ReadOnlyStorageFormat.READONLY_V2 |
static class |
ChunkedFileSet.ROEntriesIterator
Iterator for RO entries - Works only for ReadOnlyStorageFormat.READONLY_V2 |
static class |
ChunkedFileSet.ROKeyIterator
Iterator for RO keys - Works only for ReadOnlyStorageFormat.READONLY_V2 |
Constructor Summary | |
---|---|
ChunkedFileSet(java.io.File directory,
RoutingStrategy routingStrategy,
int nodeId)
|
|
ChunkedFileSet(java.io.File directory,
RoutingStrategy routingStrategy,
int nodeId,
boolean enforceMlock)
|
Method Summary | |
---|---|
void |
close()
|
java.nio.channels.FileChannel |
dataFileFor(int chunk)
|
int |
getChunkForKey(byte[] key)
Given a particular key, first converts its to the storage format and then determines which chunk it belongs to |
java.util.HashMap<java.lang.Object,java.lang.Integer> |
getChunkIdToNumChunks()
Get the chunk id to num chunks mapping |
int |
getDataFileSize(int chunk)
|
int |
getIndexFileSize(int chunk)
|
int |
getNumChunks()
|
ReadOnlyStorageFormat |
getReadOnlyStorageFormat()
|
java.nio.ByteBuffer |
indexFileFor(int chunk)
|
void |
initVersion0()
|
void |
initVersion1()
|
void |
initVersion2()
|
byte[] |
keyToStorageFormat(byte[] key)
Converts the key to the format in which it is stored for searching |
byte[] |
readValue(byte[] key,
int chunk,
int valueLocation)
|
DataFileChunkSet |
toDataFileChunkSet()
|
void |
validateFileSizes(long indexLength,
long dataLength)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChunkedFileSet(java.io.File directory, RoutingStrategy routingStrategy, int nodeId, boolean enforceMlock) throws java.io.IOException
java.io.IOException
public ChunkedFileSet(java.io.File directory, RoutingStrategy routingStrategy, int nodeId) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public DataFileChunkSet toDataFileChunkSet()
public ReadOnlyStorageFormat getReadOnlyStorageFormat()
public void initVersion0()
public void initVersion1()
public void initVersion2()
public java.util.HashMap<java.lang.Object,java.lang.Integer> getChunkIdToNumChunks()
public void validateFileSizes(long indexLength, long dataLength)
public void close()
public int getNumChunks()
public byte[] keyToStorageFormat(byte[] key)
key
- Byte array of the key
public int getChunkForKey(byte[] key)
key
- Byte array of keys
public byte[] readValue(byte[] key, int chunk, int valueLocation)
public java.nio.ByteBuffer indexFileFor(int chunk)
public java.nio.channels.FileChannel dataFileFor(int chunk)
public int getIndexFileSize(int chunk)
public int getDataFileSize(int chunk)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |