|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.splunk.Resource com.splunk.Entity com.splunk.Job
public class Job
The Job
class represents a job, which is an individual
instance of a running or completed search or report, along with its related
output.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class com.splunk.Entity |
---|
content, toUpdate |
Fields inherited from class com.splunk.Resource |
---|
actions, path, refreshArgs, service, title |
Method Summary | |
---|---|
protected java.lang.String |
actionPath(java.lang.String action)
Returns the action path. |
Job |
cancel()
Stops the current search and deletes the result cache. |
Job |
control(java.lang.String action)
Performs the requested action on this job. |
Job |
control(java.lang.String action,
java.util.Map args)
Performs the requested action on this job. |
Job |
disablePreview()
Disables preview for this job. |
Job |
enablePreview()
Enables preview for this job (although it might slow search considerably). |
Job |
finish()
Stops the job and provides intermediate results available for retrieval. |
java.util.Date |
getCursorTime()
Returns the earliest time from which no events are later scanned. |
java.lang.String |
getDelegate()
Returns a value that indicates how jobs were started (such as the scheduler). |
int |
getDiskUsage()
Returns the disk usage for this job. |
java.lang.String |
getDispatchState()
Returns the dispatch state for this job. |
float |
getDoneProgress()
Returns the approximate progress of the job, in the range of 0.0 to 1.0. |
int |
getDropCount()
Returns the number of possible events that were dropped due to the rt_queue_size (the number of events that the indexer should use
for this search). |
java.util.Date |
getEarliestTime()
Returns the earliest time in the time range to search. |
int |
getEventAvailableCount()
Returns the count of events stored by search that are available to be retrieved from the events endpoint. |
int |
getEventCount()
Returns the count of events (pre-transforming) that were generated. |
int |
getEventFieldCount()
Returns the count of event fields. |
boolean |
getEventIsStreaming()
Indicates whether the events from this job are available by streaming. |
boolean |
getEventIsTruncated()
Indicates whether any events from this job have not been stored. |
java.io.InputStream |
getEvents()
Returns the InputStream IO handle for this job's events. |
java.io.InputStream |
getEvents(JobEventsArgs args)
Returns the InputStream IO handle for this job's events. |
java.io.InputStream |
getEvents(java.util.Map args)
Returns the InputStream IO handle for this job's events. |
java.lang.String |
getEventSearch()
Returns the subset of the entire search that is before any transforming commands. |
java.lang.String |
getEventSorting()
Returns a value that indicates how events are sorted. |
java.lang.String |
getKeywords()
Returns all positive keywords used by this job. |
java.lang.String |
getLabel()
Returns this job's label. |
java.util.Date |
getLatestTime()
Returns the latest time in the time range to search. |
java.lang.String |
getName()
Returns this job's name (its search ID). |
int |
getNumPreviews()
Returns the number of previews that have been generated so far for this job. |
int |
getPriority()
Returns this job's priority in the range of 0-10. |
java.lang.String |
getRemoteSearch()
Returns the search string that is sent to every search peer for this job. |
java.lang.String |
getReportSearch()
Returns the reporting subset of this search, which is the streaming part of the search that is send to remote providers if reporting commands are used. |
int |
getResultCount()
Returns the total count of results returned for this search job. |
boolean |
getResultIsStreaming()
Indicates whether the job's results are available by streaming. |
int |
getResultPreviewCount()
Returns the number of result rows in the latest preview results for this job. |
java.io.InputStream |
getResults()
Returns the InputStream IO handle for the results from this job. |
java.io.InputStream |
getResults(JobResultsArgs args)
Returns the InputStream IO handle for the results from this job. |
java.io.InputStream |
getResults(java.util.Map args)
Returns the InputStream IO handle for the results from this job. |
java.io.InputStream |
getResultsPreview()
Returns the InputStream IO handle for the preview results from
this job. |
java.io.InputStream |
getResultsPreview(JobResultsPreviewArgs args)
Returns the InputStream IO handle for the preview results from
this job. |
java.io.InputStream |
getResultsPreview(java.util.Map args)
Returns the InputStream IO handle for the preview results from
this job. |
float |
getRunDuration()
Returns the time that the search job took to complete. |
int |
getScanCount()
Returns the number of events that are scanned or read off disk. |
java.lang.String |
getSearch()
Returns this job's search title. |
java.lang.String |
getSearchEarliestTime()
Returns the earliest time in the time range to search. |
java.lang.String |
getSearchLatestTime()
Returns the latest time in the time range to search. |
java.io.InputStream |
getSearchLog()
Returns the InputStream IO handle to the search log for this job. |
java.io.InputStream |
getSearchLog(java.util.Map args)
Returns the InputStream IO handle to the search log for this job. |
java.lang.String[] |
getSearchProviders()
Returns a list of search peers that were contacted for this search. |
java.lang.String |
getSid()
Returns the unique search identifier (SID) for this job. |
int |
getStatusBuckets()
Returns the maximum number of timeline buckets for this job. |
java.io.InputStream |
getSummary()
Returns the InputStream IO handle for the summary for this job. |
java.io.InputStream |
getSummary(JobSummaryArgs args)
Returns the InputStream IO handle for the summary for this job. |
java.io.InputStream |
getSummary(java.util.Map args)
Returns the InputStream IO handle for the summary for this job. |
java.io.InputStream |
getTimeline()
Returns the InputStream IO handle for the timeline for this job. |
java.io.InputStream |
getTimeline(java.util.Map args)
Returns the InputStream IO handle for the timeline for this job. |
int |
getTtl()
Returns this job's time to live--that is, the time before the search job expires and is still available. |
boolean |
isDone()
Indicates whether the job is done. |
boolean |
isFailed()
Indicates whether the job failed. |
boolean |
isFinalized()
Indicates whether the job is finalized (forced to finish). |
boolean |
isPaused()
Indicates whether the job is paused. |
boolean |
isPreviewEnabled()
Indicates whether preview for the job is enabled. |
boolean |
isReady()
Indicates whether the job has been scheduled and is ready to return data. |
boolean |
isRealTimeSearch()
Indicates whether the job is a real-time search. |
boolean |
isRemoteTimeline()
Indicates whether the job has a remote timeline component. |
boolean |
isSaved()
Indicates whether the job is to be saved indefinitely. |
boolean |
isSavedSearch()
Indicates whether this job was run as a saved search (via scheduler). |
boolean |
isZombie()
Indicates whether the process running the search is dead but with the search not finished. |
Job |
pause()
Pauses the current search. |
Job |
refresh()
Refreshes this job. |
void |
remove()
Unsupported. |
void |
setPriority(int value)
Sets this job's priority in the range of 0-10. |
Methods inherited from class com.splunk.Entity |
---|
clear, containsKey, containsValue, disable, enable, entrySet, get, getContent, getMetadata, isDisabled, isEmpty, isNameChangeAllowed, keySet, put, putAll, remove, size, update, update, validate, values |
Methods inherited from class com.splunk.Resource |
---|
getPath, getService, getTitle, invalidate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Method Detail |
---|
protected java.lang.String actionPath(java.lang.String action)
actionPath
in class Entity
action
- The requested action.
public Job control(java.lang.String action)
action
- The action to perform.
public Job control(java.lang.String action, java.util.Map args)
action
- The action to perform.args
- Optional arguments for this action ("ttl" and "priority").
public Job cancel()
public Job disablePreview()
public Job enablePreview()
public Job finish()
public Job pause()
public java.util.Date getCursorTime()
getLatestTime()
,
getEarliestTime()
,
getDoneProgress()
public java.lang.String getDelegate()
null
if not specified.public int getDiskUsage()
public java.lang.String getDispatchState()
public float getDoneProgress()
doneProgress = (latestTime-cursorTime)/(latestTime-earliestTime)
getLatestTime()
,
getCursorTime()
,
getEarliestTime()
public int getDropCount()
rt_queue_size
(the number of events that the indexer should use
for this search). For real-time searches only.
public java.util.Date getEarliestTime()
getLatestTime()
,
getCursorTime()
,
getDoneProgress()
public int getEventAvailableCount()
public int getEventCount()
public int getEventFieldCount()
public boolean getEventIsStreaming()
true
if events can be streamed, false
if not.public boolean getEventIsTruncated()
true
if the event return is truncated, false
if
not.public java.io.InputStream getEvents()
InputStream
IO handle for this job's events.
InputStream
IO handle.public java.io.InputStream getEvents(java.util.Map args)
InputStream
IO handle for this job's events.
args
- Optional arguments.
For a list of possible parameters, see the Request parameters for the
GET search/jobs/{search_id}/events
endpoint in the REST API documentation.
InputStream
IO handle.public java.io.InputStream getEvents(JobEventsArgs args)
InputStream
IO handle for this job's events.
args
- Optional arguments (see JobEventsArgs
).
InputStream
IO handle.public java.lang.String getEventSearch()
getReportSearch()
public java.lang.String getEventSorting()
public java.lang.String getKeywords()
public java.lang.String getLabel()
public java.util.Date getLatestTime()
getCursorTime()
,
getEarliestTime()
,
getDoneProgress()
public java.lang.String getName()
getName
in class Resource
public int getNumPreviews()
public int getPriority()
public void setPriority(int value)
value
- The new priority.public java.lang.String getRemoteSearch()
public java.lang.String getReportSearch()
getEventSearch()
public int getResultCount()
public boolean getResultIsStreaming()
true
if results can be streamed, false
if not.public int getResultPreviewCount()
public java.io.InputStream getResults()
InputStream
IO handle for the results from this job.
InputStream
IO handle.public java.io.InputStream getResults(java.util.Map args)
InputStream
IO handle for the results from this job.
args
- Optional arguments.
For a list of possible parameters, see the Request parameters for the
GET search/jobs/{search_id}/results
endpoint in the REST API documentation.
InputStream
IO handle.public java.io.InputStream getResults(JobResultsArgs args)
InputStream
IO handle for the results from this job.
args
- Optional arguments (see JobResultsArgs
).
InputStream
IO handle.public java.io.InputStream getResultsPreview()
InputStream
IO handle for the preview results from
this job.
InputStream
IO handle.public java.io.InputStream getResultsPreview(java.util.Map args)
InputStream
IO handle for the preview results from
this job.
args
- Optional arguments.
For a list of possible parameters, see the Request parameters for the
GET search/jobs/{search_id}/results_preview
endpoint in the REST API documentation.
InputStream
IO handle.public java.io.InputStream getResultsPreview(JobResultsPreviewArgs args)
InputStream
IO handle for the preview results from
this job.
args
- Optional arguments (see JobResultsPreviewArgs
).
InputStream
IO handle.public float getRunDuration()
public int getScanCount()
public java.lang.String getSearch()
public java.lang.String getSearchEarliestTime()
getLatestTime()
,
getCursorTime()
,
getDoneProgress()
public java.lang.String getSearchLatestTime()
getEarliestTime()
,
getCursorTime()
,
getDoneProgress()
public java.io.InputStream getSearchLog()
InputStream
IO handle to the search log for this job.
InputStream
IO handle.public java.io.InputStream getSearchLog(java.util.Map args)
InputStream
IO handle to the search log for this job.
args
- Optional argument ("attachment").
InputStream
IO handle.public java.lang.String[] getSearchProviders()
public java.lang.String getSid()
public java.io.InputStream getSummary()
InputStream
IO handle for the summary for this job.
InputStream
IO handle.public java.io.InputStream getSummary(java.util.Map args)
InputStream
IO handle for the summary for this job.
args
- Optional arguments.
For a list of possible parameters, see the Request parameters for the
GET search/jobs/{search_id}/summary
endpoint in the REST API documentation.
InputStream
IO handle.public java.io.InputStream getSummary(JobSummaryArgs args)
InputStream
IO handle for the summary for this job.
args
- Optional arguments (see JobSummaryArgs
).
InputStream
IO handle.public int getStatusBuckets()
public java.io.InputStream getTimeline()
InputStream
IO handle for the timeline for this job.
InputStream
IO handle.public java.io.InputStream getTimeline(java.util.Map args)
InputStream
IO handle for the timeline for this job.
args
- Optional arguments ("output_time_format" and "time_format").
InputStream
IO handle.public int getTtl()
public boolean isDone()
true
if the job is done, false
if not.public boolean isFailed()
true
if the job failed, false
if not.public boolean isFinalized()
true
if the job is finalized, false
if not.public boolean isPaused()
true
if the job is paused, false
if not.public boolean isPreviewEnabled()
true
if preview is enabled, false
if not.public boolean isReady()
true
if the job is ready to return data, false
if
not.public boolean isRealTimeSearch()
true
if the job is a real-time search, false
if
not.public boolean isRemoteTimeline()
true
if the job has a remote timeline component,
false
if not.public boolean isSaved()
true
if the job has been saved, false
if not.public boolean isSavedSearch()
true
if the job is from a saved search, false
if not.public boolean isZombie()
true
if the job is a zombie, false
if not.public Job refresh()
refresh
in class Entity
public void remove()
remove
in class Entity
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |