public class TAPExecutionReport
extends java.lang.Object
It gives information on the job parameters, the job ID, whether it is a synchronous task or not, times of each execution step (uploading, parsing, executing and writing), the resulting columns and the success or not of the execution.
This report is completely filled by ADQLExecutor
, and aims to be
used/read only at the end of the job or when it is definitely finished.
Modifier and Type | Field and Description |
---|---|
protected long[] |
durations
Duration of all execution steps.
|
java.lang.String |
fixedQuery
Input ADQL query after an automatic fix by TAP-Lib.
|
java.lang.String |
jobID
ID of the job whose the execution is reported here.
|
long |
nbRows
Total number of written rows.
|
TAPParameters |
parameters
List of all parameters provided in the user request.
|
DBColumn[] |
resultingColumns
List of all resulting columns.
|
boolean |
success
Indicate whether this job has ended successfully or not.
|
boolean |
synchronous
Indicate whether this execution is done in a synchronous or asynchronous
job.
|
protected long |
totalDuration
Total duration of the job execution.
|
Constructor and Description |
---|
TAPExecutionReport(java.lang.String jobID,
boolean synchronous,
TAPParameters params)
Build an empty execution report.
|
Modifier and Type | Method and Description |
---|---|
long |
getDuration(ExecutionProgression tapStep)
Get the duration corresponding to the given job execution step.
|
long |
getExecutionDuration()
Get the execution of the EXECUTION step.
|
long |
getFormattingDuration()
Get the execution of the FORMAT step.
|
protected int |
getIndexDuration(ExecutionProgression tapProgression)
Map the execution progression with an index inside the
durations
array. |
long |
getParsingDuration()
Get the execution of the PARSE step.
|
long |
getTotalDuration()
Get the total duration of the job execution.
|
long |
getUploadDuration()
Get the execution of the UPLOAD step.
|
void |
setDuration(ExecutionProgression tapStep,
long duration)
Set the duration corresponding to the given execution step.
|
void |
setTotalDuration(long duration)
Set the total duration of the job execution.
|
public final java.lang.String jobID
public final boolean synchronous
public final TAPParameters parameters
public java.lang.String fixedQuery
This field is set only if the option fix_on_fail is enabled in the TAP configuration and that a query has been fixed.
public DBColumn[] resultingColumns
public long nbRows
protected final long[] durations
protected long totalDuration
public boolean success
public TAPExecutionReport(java.lang.String jobID, boolean synchronous, TAPParameters params)
jobID
- ID of the job whose the execution must be described
here.synchronous
- true if the job is synchronous,
false otherwise.params
- List of all parameters provided by the user for the
execution.protected int getIndexDuration(ExecutionProgression tapProgression)
durations
array.
Warning:
for the moment, only ExecutionProgression.UPLOADING
,
ExecutionProgression.PARSING
,
ExecutionProgression.EXECUTING_ADQL
and
ExecutionProgression.WRITING_RESULT
are managed.
tapProgression
- Execution progression.durations
,
or -1 if the given execution progression is not managed.public final long getDuration(ExecutionProgression tapStep)
tapStep
- Job execution step.getIndexDuration(ExecutionProgression)
public final void setDuration(ExecutionProgression tapStep, long duration)
tapStep
- Job execution step.duration
- Duration (in ms) of the given execution step.public final long getUploadDuration()
getDuration(ExecutionProgression)
public final long getParsingDuration()
getDuration(ExecutionProgression)
public final long getExecutionDuration()
getDuration(ExecutionProgression)
public final long getFormattingDuration()
getDuration(ExecutionProgression)
public final long getTotalDuration()
public final void setTotalDuration(long duration)
duration
- Duration (in ms) to set.