Documentation ¶
Index ¶
- func ConvertSITimeout(millis int64) time.Duration
- func ConvertSITimeoutWithAdjustment(siApp *si.AddApplicationRequest, defaultTimeout time.Duration) time.Duration
- func ConvertSITimestamp(ts string) time.Time
- func GetBoolEnvVar(key string, defaultVal bool) bool
- func GetNewUUID() string
- func GetNormalizedPartitionName(partitionName string, rmID string) string
- func GetPartitionNameWithoutClusterID(partitionName string) string
- func GetRMIdFromPartitionName(partitionName string) string
- func GetRequiredNodeFromTag(tags map[string]string) string
- func IsAllowPreemptOther(policy *si.PreemptionPolicy) bool
- func IsAllowPreemptSelf(policy *si.PreemptionPolicy) bool
- func ParseEndpoint(ep string) (string, string, error)
- func WaitFor(interval time.Duration, timeout time.Duration, condition func() bool) error
- func WaitForCondition(eval func() bool, interval time.Duration, timeout time.Duration) error
- func ZeroTimeInUnixNano(t time.Time) *int64
- type NonBlockingGRPCServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertSITimeout ¶
ConvertSITimeout Convert a SI execution timeout, given in milliseconds into a time.Duration object. This will always return a positive value or zero (0). A negative timeout will be converted into zero (0), which means never timeout. The conversion handles overflows in the conversion by setting it to zero (0) also.
func ConvertSITimeoutWithAdjustment ¶
func ConvertSITimeoutWithAdjustment(siApp *si.AddApplicationRequest, defaultTimeout time.Duration) time.Duration
ConvertSITimeoutWithAdjustment Similar to ConvertSITimeout, but this function also adjusts the timeout if "creationTime" is defined. It's used during Yunikorn restart, in order to properly track how long a placeholder pod should be in "Running" state.
func ConvertSITimestamp ¶
func GetBoolEnvVar ¶
func GetNewUUID ¶
func GetNewUUID() string
Generate a new uuid. The chance that we generate a collision is really small. As long as we check the UUID before we communicate it back to the RM we can still replace it without a problem.
func GetRequiredNodeFromTag ¶
func IsAllowPreemptOther ¶ added in v1.3.0
func IsAllowPreemptOther(policy *si.PreemptionPolicy) bool
func IsAllowPreemptSelf ¶ added in v1.3.0
func IsAllowPreemptSelf(policy *si.PreemptionPolicy) bool
func WaitForCondition ¶ added in v1.2.0
func ZeroTimeInUnixNano ¶
ZeroTimeInUnixNano return the unix nano or nil if the time is zero.
Types ¶
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start(endpoint string, ss si.SchedulerServer) // Waits for the service to stop Wait() // Stops the service gracefully Stop() // Stops the service forcefully ForceStop() }
Defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() NonBlockingGRPCServer