6674 |
11 Apr 22 |
nicklas |
1 |
package net.sf.basedb.reggie.grid; |
6674 |
11 Apr 22 |
nicklas |
2 |
|
6674 |
11 Apr 22 |
nicklas |
3 |
import net.sf.basedb.opengrid.config.BatchConfig; |
6674 |
11 Apr 22 |
nicklas |
4 |
|
6674 |
11 Apr 22 |
nicklas |
5 |
/** |
6674 |
11 Apr 22 |
nicklas |
An abstract base class for job creator implementations that |
6674 |
11 Apr 22 |
nicklas |
is implementing a few common options and configuration settings. |
6674 |
11 Apr 22 |
nicklas |
@since 4.38 |
6674 |
11 Apr 22 |
nicklas |
9 |
*/ |
6674 |
11 Apr 22 |
nicklas |
10 |
public abstract class AbstractJobCreator |
6674 |
11 Apr 22 |
nicklas |
11 |
{ |
6674 |
11 Apr 22 |
nicklas |
12 |
|
6674 |
11 Apr 22 |
nicklas |
13 |
protected boolean debug; |
6674 |
11 Apr 22 |
nicklas |
14 |
protected Integer priority; |
6979 |
16 Jan 23 |
nicklas |
15 |
protected String partition; |
7372 |
06 Oct 23 |
nicklas |
16 |
protected String submitOptionsOverride; |
6674 |
11 Apr 22 |
nicklas |
17 |
protected boolean autoConfirm; |
6674 |
11 Apr 22 |
nicklas |
18 |
protected BatchConfig batchConfig; |
6674 |
11 Apr 22 |
nicklas |
19 |
|
6674 |
11 Apr 22 |
nicklas |
20 |
protected AbstractJobCreator() |
6674 |
11 Apr 22 |
nicklas |
21 |
{} |
6674 |
11 Apr 22 |
nicklas |
22 |
|
6674 |
11 Apr 22 |
nicklas |
23 |
/** |
6674 |
11 Apr 22 |
nicklas |
If this flag is set, the job is automatically confirmed and |
6674 |
11 Apr 22 |
nicklas |
scheduled for the next step if certain rules are met. |
6674 |
11 Apr 22 |
nicklas |
26 |
*/ |
6674 |
11 Apr 22 |
nicklas |
27 |
public void setAutoConfirm(boolean autoConfirm) |
6674 |
11 Apr 22 |
nicklas |
28 |
{ |
6674 |
11 Apr 22 |
nicklas |
29 |
this.autoConfirm = autoConfirm; |
6674 |
11 Apr 22 |
nicklas |
30 |
} |
6674 |
11 Apr 22 |
nicklas |
31 |
|
6674 |
11 Apr 22 |
nicklas |
32 |
|
6674 |
11 Apr 22 |
nicklas |
33 |
/** |
6674 |
11 Apr 22 |
nicklas |
If the debug flag is set, the job is created in debug mode, which means |
6674 |
11 Apr 22 |
nicklas |
that some temporary files are not removed, and only chr1 is used if the |
6674 |
11 Apr 22 |
nicklas |
number of aligned pairs is bigger than the 'cufflinks/debug-max-aligned' |
6674 |
11 Apr 22 |
nicklas |
setting. |
6674 |
11 Apr 22 |
nicklas |
38 |
*/ |
6674 |
11 Apr 22 |
nicklas |
39 |
public void setDebug(boolean debug) |
6674 |
11 Apr 22 |
nicklas |
40 |
{ |
6674 |
11 Apr 22 |
nicklas |
41 |
this.debug = debug; |
6674 |
11 Apr 22 |
nicklas |
42 |
} |
6674 |
11 Apr 22 |
nicklas |
43 |
|
6674 |
11 Apr 22 |
nicklas |
44 |
/** |
6674 |
11 Apr 22 |
nicklas |
Set the priority value for the job on the cluster. If set to null, |
6674 |
11 Apr 22 |
nicklas |
the job is submitted with default priority. |
6674 |
11 Apr 22 |
nicklas |
47 |
*/ |
6674 |
11 Apr 22 |
nicklas |
48 |
public void setPriority(Integer priority) |
6674 |
11 Apr 22 |
nicklas |
49 |
{ |
6674 |
11 Apr 22 |
nicklas |
50 |
this.priority = priority; |
6674 |
11 Apr 22 |
nicklas |
51 |
} |
6979 |
16 Jan 23 |
nicklas |
52 |
|
6979 |
16 Jan 23 |
nicklas |
53 |
/** |
6979 |
16 Jan 23 |
nicklas |
Set the partition (=queue) for the job on the cluster. If set to null, |
6979 |
16 Jan 23 |
nicklas |
the job is submitted to the default partition. |
6979 |
16 Jan 23 |
nicklas |
@since 4.42 |
6979 |
16 Jan 23 |
nicklas |
57 |
*/ |
6979 |
16 Jan 23 |
nicklas |
58 |
public void setPartition(String partition) |
6979 |
16 Jan 23 |
nicklas |
59 |
{ |
6979 |
16 Jan 23 |
nicklas |
60 |
this.partition = partition; |
6979 |
16 Jan 23 |
nicklas |
61 |
} |
7372 |
06 Oct 23 |
nicklas |
62 |
|
7372 |
06 Oct 23 |
nicklas |
63 |
/** |
7372 |
06 Oct 23 |
nicklas |
Manually set options that override the <submit> options from |
7372 |
06 Oct 23 |
nicklas |
the reggie-config.xml file. |
7372 |
06 Oct 23 |
nicklas |
@since 4.49.3 |
7372 |
06 Oct 23 |
nicklas |
67 |
*/ |
7372 |
06 Oct 23 |
nicklas |
68 |
public void setSubmitOptionsOverride(String submitOptions) |
7372 |
06 Oct 23 |
nicklas |
69 |
{ |
7372 |
06 Oct 23 |
nicklas |
70 |
this.submitOptionsOverride = submitOptions; |
7372 |
06 Oct 23 |
nicklas |
71 |
} |
6674 |
11 Apr 22 |
nicklas |
72 |
|
6674 |
11 Apr 22 |
nicklas |
73 |
public void setBatchConfig(BatchConfig batchConfig) |
6674 |
11 Apr 22 |
nicklas |
74 |
{ |
6674 |
11 Apr 22 |
nicklas |
75 |
this.batchConfig = batchConfig; |
6674 |
11 Apr 22 |
nicklas |
76 |
} |
6979 |
16 Jan 23 |
nicklas |
77 |
|
6674 |
11 Apr 22 |
nicklas |
78 |
} |