@InterfaceAudience.Private @InterfaceStability.Unstable public class TrafficControlBandwidthHandlerImpl extends Object implements OutboundBandwidthResourceHandler
Constructor and Description |
---|
TrafficControlBandwidthHandlerImpl(PrivilegedOperationExecutor privilegedOperationExecutor,
CGroupsHandler cGroupsHandler,
org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.resources.TrafficController trafficController) |
Modifier and Type | Method and Description |
---|---|
List<PrivilegedOperation> |
bootstrap(org.apache.hadoop.conf.Configuration configuration)
Bootstrapping 'outbound-bandwidth' resource handler - mounts net_cls
controller and bootstraps a traffic control bandwidth shaping hierarchy
|
Map<org.apache.hadoop.yarn.api.records.ContainerId,Integer> |
getBytesSentPerContainer()
Returns total bytes sent per container to be used for metrics tracking
purposes.
|
List<PrivilegedOperation> |
postComplete(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Cleanup operations once container is completed - deletes cgroup and
removes traffic shaping rule(s).
|
List<PrivilegedOperation> |
preStart(Container container)
Pre-start hook for 'outbound-bandwidth' resource.
|
List<PrivilegedOperation> |
reacquireContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Reacquires state for a container - reads the classid from the cgroup
being used for the container being reacquired
|
List<PrivilegedOperation> |
teardown()
Teardown environment for resource subsystem if requested.
|
String |
toString() |
List<PrivilegedOperation> |
updateContainer(Container container)
Update state for container that was already launched
|
public TrafficControlBandwidthHandlerImpl(PrivilegedOperationExecutor privilegedOperationExecutor, CGroupsHandler cGroupsHandler, org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.resources.TrafficController trafficController)
public List<PrivilegedOperation> bootstrap(org.apache.hadoop.conf.Configuration configuration) throws ResourceHandlerException
bootstrap
in interface ResourceHandler
configuration
- yarn configuration in useResourceHandlerException
public List<PrivilegedOperation> preStart(Container container) throws ResourceHandlerException
preStart
in interface ResourceHandler
container
- Container being launchedResourceHandlerException
public List<PrivilegedOperation> reacquireContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException
reacquireContainer
in interface ResourceHandler
containerId
- if of the container being reacquired.ResourceHandlerException
public List<PrivilegedOperation> updateContainer(Container container) throws ResourceHandlerException
ResourceHandler
updateContainer
in interface ResourceHandler
container
- the container being updated.ResourceHandlerException
public Map<org.apache.hadoop.yarn.api.records.ContainerId,Integer> getBytesSentPerContainer() throws ResourceHandlerException
ResourceHandlerException
public List<PrivilegedOperation> postComplete(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws ResourceHandlerException
postComplete
in interface ResourceHandler
containerId
- of the container that was completed.ResourceHandlerException
public List<PrivilegedOperation> teardown() throws ResourceHandlerException
ResourceHandler
teardown
in interface ResourceHandler
ResourceHandlerException
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.