public class ShortCircuitRegistry
extends java.lang.Object
DfsClientShmManager.| Modifier and Type | Class | Description |
|---|---|---|
static class |
ShortCircuitRegistry.NewShmInfo |
|
static class |
ShortCircuitRegistry.RegisteredShm |
|
static interface |
ShortCircuitRegistry.Visitor |
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
ShortCircuitRegistry(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method | Description |
|---|---|---|
ShortCircuitRegistry.NewShmInfo |
createNewMemorySegment(java.lang.String clientName,
org.apache.hadoop.net.unix.DomainSocket sock) |
Handle a DFSClient request to create a new memory segment.
|
java.lang.String |
getClientNames(org.apache.hadoop.hdfs.ExtendedBlockId blockId) |
|
int |
getShmNum() |
|
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 java.io.IOException
java.io.IOExceptionpublic 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 java.lang.String getClientNames(org.apache.hadoop.hdfs.ExtendedBlockId blockId)
public ShortCircuitRegistry.NewShmInfo createNewMemorySegment(java.lang.String clientName, org.apache.hadoop.net.unix.DomainSocket sock) throws java.io.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.java.io.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.InvalidRequestExceptionpublic void unregisterSlot(org.apache.hadoop.hdfs.shortcircuit.ShortCircuitShm.SlotId slotId)
throws org.apache.hadoop.fs.InvalidRequestException
org.apache.hadoop.fs.InvalidRequestExceptionpublic void shutdown()
@VisibleForTesting public boolean visit(ShortCircuitRegistry.Visitor visitor)
@VisibleForTesting public int getShmNum()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.