public class ShortCircuitRegistry extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ShortCircuitRegistry.NewShmInfo |
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
ShortCircuitRegistry(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
ShortCircuitRegistry.NewShmInfo |
createNewMemorySegment(String clientName,
org.apache.hadoop.net.unix.DomainSocket sock)
Handle a DFSClient request to create a new memory segment.
|
void |
processBlockMlockEvent(ExtendedBlockId blockId)
Process a block mlock event from the FsDatasetCache.
|
boolean |
processBlockMunlockRequest(ExtendedBlockId blockId)
Mark any slots associated with this blockId as unanchorable.
|
void |
registerSlot(ExtendedBlockId blockId,
ShortCircuitShm.SlotId slotId,
boolean isCached) |
void |
removeShm(ShortCircuitShm shm) |
void |
shutdown() |
void |
unregisterSlot(ShortCircuitShm.SlotId slotId) |
public static final org.apache.commons.logging.Log LOG
public ShortCircuitRegistry(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void removeShm(ShortCircuitShm shm)
public void processBlockMlockEvent(ExtendedBlockId blockId)
blockId
- The block that was mlocked.public boolean processBlockMunlockRequest(ExtendedBlockId blockId)
blockId
- The block ID.public ShortCircuitRegistry.NewShmInfo createNewMemorySegment(String clientName, org.apache.hadoop.net.unix.DomainSocket sock) throws IOException
clientName
- Client name as reported by the client.sock
- The DomainSocket to associate with this memory
segment. When this socket is closed, or the
other side writes anything to the socket, the
segment will be closed. This can happen at any
time, including right after this function returns.IOException
- If the new memory segment could not be created.public void registerSlot(ExtendedBlockId blockId, ShortCircuitShm.SlotId slotId, boolean isCached) throws org.apache.hadoop.fs.InvalidRequestException
org.apache.hadoop.fs.InvalidRequestException
public void unregisterSlot(ShortCircuitShm.SlotId slotId) throws org.apache.hadoop.fs.InvalidRequestException
org.apache.hadoop.fs.InvalidRequestException
public void shutdown()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.