Package org.apache.storm.container.oci
Class OciContainerManager
java.lang.Object
org.apache.storm.container.oci.OciContainerManager
- All Implemented Interfaces:
- ResourceIsolationInterface
- Direct Known Subclasses:
- DockerManager,- RuncLibContainerManager
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidThis function will be called when the worker needs to shutdown.protected StringcommandFilePath(String dir, String commandTag) protected StringgetImageName(Map<String, Object> topoConf) Get image name from topology Conf.longGet the amount of free memory in MB.voidCalled when starting up.voidreserveResourcesForWorker(String workerId, Integer workerMemoryMb, Integer workerCpu, String numaId) This function should be used prior to starting the worker to reserve resources for the worker.protected StringwriteToCommandFile(String workerDir, String command, String commandTag) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.container.ResourceIsolationInterfaceareAllProcessesDead, forceKill, getMemoryUsage, isResourceManaged, kill, launchWorkerProcess, runProfilingCommand
- 
Field Details- 
conf
- 
readonlyBindmounts
- 
readwriteBindmounts
- 
seccompJsonFile
- 
nscdPath
- 
TMP_DIR
- 
stormHome
- 
cgroupRootPath
- 
cgroupParent
- 
memoryCgroupRootPath
- 
memoryCoreAtRoot
- 
workerToCpu
- 
workerToMemoryMb
- 
validatedNumaMap
- 
workerToCores
- 
workerToMemoryZone
 
- 
- 
Constructor Details- 
OciContainerManagerpublic OciContainerManager()
 
- 
- 
Method Details- 
prepareDescription copied from interface:ResourceIsolationInterfaceCalled when starting up.- Specified by:
- preparein interface- ResourceIsolationInterface
- Parameters:
- conf- the cluster config
- Throws:
- IOException- on any error.
 
- 
reserveResourcesForWorkerpublic void reserveResourcesForWorker(String workerId, Integer workerMemoryMb, Integer workerCpu, String numaId) Description copied from interface:ResourceIsolationInterfaceThis function should be used prior to starting the worker to reserve resources for the worker.- Specified by:
- reserveResourcesForWorkerin interface- ResourceIsolationInterface
- Parameters:
- workerId- worker id of the worker to start
- workerMemoryMb- the amount of memory for the worker or null if not enforced
- workerCpu- the amount of cpu for the worker or null if not enforced
- numaId- NUMA zone if applicable the worker should be bound to
 
- 
cleanupDescription copied from interface:ResourceIsolationInterfaceThis function will be called when the worker needs to shutdown. This function should include logic to clean up after a worker is shutdown.- Specified by:
- cleanupin interface- ResourceIsolationInterface
- Parameters:
- user- the user of the worker
- workerId- worker id to shutdown and clean up after
- port- the port of the worker
- Throws:
- IOException
 
- 
getSystemFreeMemoryMbDescription copied from interface:ResourceIsolationInterfaceGet the amount of free memory in MB. This might not be the entire box, it might be within a parent resource group.- Specified by:
- getSystemFreeMemoryMbin interface- ResourceIsolationInterface
- Returns:
- The amount of memory in MB that are free on the system.
- Throws:
- IOException- on I/O exception
 
- 
getImageNameGet image name from topology Conf.- Parameters:
- topoConf- topology configuration
- Returns:
- the image name
 
- 
commandFilePath
- 
writeToCommandFileprotected String writeToCommandFile(String workerDir, String command, String commandTag) throws IOException - Throws:
- IOException
 
 
-