Show / Hide Table of Contents

Class Job

Represents a batch job.

Inheritance
object
FlowModelObject
Job
Inherited Members
FlowModelObject.BatchNumber
FlowModelObject.Properties
FlowModelObject.PropertiesContent
FlowModelObject.this[string]
FlowModelObject.UpdateProperties(string)
FlowModelObject.UpdateProperties(FlowModelObject)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: DNVGL.One.Compute.Core.FlowModel
Assembly: DNVGL.One.Compute.Core.dll
Syntax
[DataContract]
public class Job : FlowModelObject

Constructors

View Source

Job(string)

Initializes a new instance of the Job class.

Declaration
public Job(string userId = null)
Parameters
Type Name Description
string userId

The user identifier.

Remarks

Notice that the job can be created without setting a user id, but by default, the Job Scheduler will not allow a job to be scheduled without setting a valid user id.

View Source

Job(string, string)

Initializes a new instance of the Job class.

Declaration
[JsonConstructor]
public Job(string jobId, string userId)
Parameters
Type Name Description
string jobId

The job identifier.

string userId

The user identifier, which should be an email address and conform to the validation rules set by the JobScheduler used.

Exceptions
Type Condition
ArgumentNullException

jobId - The job Id cannot be empty.

ArgumentException

jobId - The job Id must be between 1 and 64 characters long and can only contain alphanumeric, underscore and hyphen characters.

Properties

View Source

ClientReference

Gets or sets the client job reference. This is reserved for use by the client for referencing purposes and will not be used by One Compute.

Declaration
[DataMember]
public string ClientReference { get; set; }
Property Value
Type Description
string

The client job reference.

View Source

DeploymentModel

Gets or sets the deployment model.

Declaration
[DataMember]
public DeploymentModel DeploymentModel { get; set; }
Property Value
Type Description
DeploymentModel

The deployment model.

View Source

FailureStrategy

Gets the failure strategy for the job.

Declaration
public FailureStrategy FailureStrategy { get; }
Property Value
Type Description
FailureStrategy

The failure strategy.

View Source

JobControllerWork

Gets or sets the job controller work. The job terminates when the job controller work unit terminates.

Declaration
[DataMember]
public WorkUnit JobControllerWork { get; set; }
Property Value
Type Description
WorkUnit
View Source

JobId

Gets the job identifier.

Declaration
[DataMember]
public string JobId { get; }
Property Value
Type Description
string

The job identifier.

View Source

JobPreparationWork

Gets or sets the Job Preparation Task for preparing the nodes to execute this Job.

Declaration
[DataMember]
public WorkUnit JobPreparationWork { get; set; }
Property Value
Type Description
WorkUnit

The Job Preparation Task for this Job.

View Source

JobReleaseWork

Gets or sets the Job Release Task to execute on the nodes after this Job completes.

Declaration
[DataMember]
public WorkUnit JobReleaseWork { get; set; }
Property Value
Type Description
WorkUnit

The Job Release Task for this Job.

View Source

MaxLogLevel

Gets or sets the maximum log level for this job.

Declaration
[DataMember]
public TraceLevel MaxLogLevel { get; set; }
Property Value
Type Description
TraceLevel
Remarks

Messages logged by the worker with log levels above this value will be discarded. Default is Info.

View Source

MessageQueues

Gets or sets the message queues that can be used freely to communicate amongst the workers in the job while the Job is running.

Declaration
[DataMember]
public string[] MessageQueues { get; set; }
Property Value
Type Description
string[]

The communication message queues for this Job.

View Source

Name

Gets or sets the name of the job. This is reserved for use by the client for description purposes and will not be used by One Compute.

Declaration
[DataMember]
public string Name { get; set; }
Property Value
Type Description
string

The name of the job.

View Source

PoolId

Gets or sets the requested pool id.

Declaration
[DataMember]
public string PoolId { get; set; }
Property Value
Type Description
string

The id of the requested pool.

View Source

SchedulingOptions

Gets or sets the scheduling options for scheduling the work inside this Job.

Declaration
[DataMember]
public SchedulingOptions SchedulingOptions { get; set; }
Property Value
Type Description
SchedulingOptions

The scheduling options for this Job.

View Source

ServiceName

Gets or sets the requested service name.

Declaration
[DataMember]
public string ServiceName { get; set; }
Property Value
Type Description
string

The name of the service.

Remarks

In the context of OneCompute Platform, this is the name of the application.

View Source

Tags

Gets or sets tags of the job.

Declaration
[DataMember]
public string Tags { get; set; }
Property Value
Type Description
string

The tags.

Remarks

Tags are semicolon separated string.

View Source

TimeoutSeconds

Gets or sets the job timeout in seconds.

Declaration
[DataMember]
public int TimeoutSeconds { get; set; }
Property Value
Type Description
int

The job timeout in seconds.

Remarks

If set to a value > 0, the job will be canceled if the job has not completed within this amount of seconds. If set to 0 (default) or less, the job will never time out.

View Source

UserId

Gets or sets the identifier of the user submitting the job.

Declaration
[DataMember]
public string UserId { get; set; }
Property Value
Type Description
string

The user identifier.

View Source

Work

Gets or sets the work.

Declaration
[DataMember]
public WorkItem Work { get; set; }
Property Value
Type Description
WorkItem

The work.

Methods

View Source

GetWorkItem(string)

Gets the work item.

Declaration
public WorkItem GetWorkItem(string id)
Parameters
Type Name Description
string id

The identifier.

Returns
Type Description
WorkItem

The work item.

View Source

Initialize()

Initializes this instance.

Declaration
public void Initialize()
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
  • View Source
In this article
Back to top Copyright © DNV AS. All rights reserved.