Package uk.ac.manchester.spinnaker.alloc
Class SpallocProperties.CompatibilityProperties
java.lang.Object
uk.ac.manchester.spinnaker.alloc.SpallocProperties.CompatibilityProperties
- Enclosing class:
- SpallocProperties
public static class SpallocProperties.CompatibilityProperties extends Object
Settings relating to the v1 spalloc configuration interface.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description @NotNull Duration
getDefaultKeepalive()
@NotBlank String
getHost()
@NotNull Duration
getNotifyWaitTime()
@uk.ac.manchester.spinnaker.utils.validation.TCPPort(ephemeral=false) int
getPort()
@NotNull Duration
getReceiveTimeout()
Making this too short makes the service more expensive.String
getServiceGroup()
What group to run jobs submitted through the spalloc v1 compatibility service against.String
getServiceUser()
What user to run jobs submitted through the spalloc v1 compatibility service with.@NotNull Duration
getShutdownTimeout()
@javax.validation.constraints.PositiveOrZero int
getThreadPoolSize()
boolean
isEnable()
-
Constructor Details
-
CompatibilityProperties
public CompatibilityProperties(@DefaultValue("false") boolean enable, @DefaultValue("0") int threadPoolSize, @DefaultValue("0.0.0.0") String host, @DefaultValue("22244") int port, @DefaultValue("") String serviceUser, @DefaultValue("") String serviceGroup, @DefaultValue("2000ms") Duration receiveTimeout, @DefaultValue("3s") Duration shutdownTimeout, @DefaultValue("1m") Duration notifyWaitTime, @DefaultValue("1m") Duration defaultKeepalive)- Parameters:
enable
- Whether to turn the spalloc version 1 compatibility service interface on.threadPoolSize
- The number of threads to use to service the v1 clients. 0 means no limit.host
- What hostname to run the spalloc v1 compatibility service on.port
- What TCP port to run the spalloc v1 compatibility service on.serviceUser
- What user to run jobs submitted through the spalloc v1 compatibility service with. We recommend that this user exists but is disabled (i.e., login using this service identity need not be supported).serviceGroup
- What group to run jobs submitted through the spalloc v1 compatibility service against. This group needs to exist, and the service user needs to be a member of it, but does not need to have a quota set.receiveTimeout
- How long to wait for a message to be received. Making this too short makes the service more expensive. Making this too long makes the service difficult to shut down correctly.shutdownTimeout
- How long to wait for the executor to shut down, maximum.notifyWaitTime
- How long to pass to the spalloc core to wait for timeouts relating to message notifications (i.e., due to machine or job status changes).defaultKeepalive
- The default value for the keepalive property of jobs.
-
-
Method Details
-
isEnable
public boolean isEnable()- Returns:
- Whether to turn the spalloc version 1 compatibility service interface on.
-
getThreadPoolSize
- Returns:
- The number of threads to use to service the v1 clients. 0 means no limit (slightly dangerous).
-
getHost
- Returns:
- What host address to run the spalloc v1 compatibility service on.
-
getPort
@TCPPort(ephemeral=false) public @uk.ac.manchester.spinnaker.utils.validation.TCPPort(ephemeral=false) int getPort()- Returns:
- What TCP port to run the spalloc v1 compatibility service on.
-
getServiceUser
What user to run jobs submitted through the spalloc v1 compatibility service with. We recommend that this user exists but is disabled (i.e., login using this service identity need not be supported).- Returns:
- What user to run jobs submitted through the spalloc v1 compatibility service with.
-
getServiceGroup
What group to run jobs submitted through the spalloc v1 compatibility service against. This group needs to exist, and the service user needs to be a member of it, but does not need to have a quota set.- Returns:
- What group to run jobs submitted through the spalloc v1 compatibility service against.
-
getShutdownTimeout
- Returns:
- How long to wait for the executor to shut down, maximum.
-
getReceiveTimeout
Making this too short makes the service more expensive. Making this too long makes the service difficult to shut down correctly. (Failure to receive in this time triggers an exception, but it needs to be fairly frequent or the thread can't be interrupted.)- Returns:
- How long to wait for a message to be received.
-
getNotifyWaitTime
- Returns:
- How long to pass to the spalloc core to wait for timeouts relating to message notifications (i.e., due to machine or job status changes).
-
getDefaultKeepalive
- Returns:
- The default value for the keepalive property of jobs.
-