public class ShortCircuitRegistry extends Object
DfsClientShmManager
.Modifier and Type | Class and Description |
---|---|
static class |
ShortCircuitRegistry.NewShmInfo |
static class |
ShortCircuitRegistry.RegisteredShm |
static interface |
ShortCircuitRegistry.Visitor |
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.
|
String |
getClientNames(org.apache.hadoop.hdfs.ExtendedBlockId blockId) |
void |
processBlockInvalidation(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
Invalidate any slot associated with a blockId that we are invalidating
(deleting) from this DataNode.
|
void |
processBlockMlockEvent(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
Process a block mlock event from the FsDatasetCache.
|
boolean |
processBlockMunlockRequest(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
Mark any slots associated with this blockId as unanchorable.
|
void |
registerSlot(org.apache.hadoop.hdfs.ExtendedBlockId blockId,
org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm.SlotId slotId,
boolean isCached) |
void |
removeShm(org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm shm) |
void |
shutdown() |
void |
unregisterSlot(org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm.SlotId slotId) |
boolean |
visit(ShortCircuitRegistry.Visitor visitor) |
public ShortCircuitRegistry(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void removeShm(org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm shm)
public void processBlockMlockEvent(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
blockId
- The block that was mlocked.public boolean processBlockMunlockRequest(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
blockId
- The block ID.public void processBlockInvalidation(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
blockId
- The block ID.public String getClientNames(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
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(org.apache.hadoop.hdfs.ExtendedBlockId blockId, org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm.SlotId slotId, boolean isCached) throws org.apache.hadoop.fs.InvalidRequestException
org.apache.hadoop.fs.InvalidRequestException
public void unregisterSlot(org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm.SlotId slotId) throws org.apache.hadoop.fs.InvalidRequestException
org.apache.hadoop.fs.InvalidRequestException
public void shutdown()
public boolean visit(ShortCircuitRegistry.Visitor visitor)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.