/** * Returns the dispatch state for this job. <br> * Valid values are: QUEUED, PARSING, RUNNING, PAUSED, FINALIZING, FAILED, * or DONE. * * @return This job's dispatch state. */ public String getDispatchState() { checkReady(); return getString("dispatchState"); }
/** * Returns the count of events (pre-transforming) that were generated as a long. * * @return The number of events. */ public long getEventCountLong() { checkReady(); return getLong("eventCount"); }
/** * Returns all positive keywords used by this job. A positive keyword is * a keyword that is not in a NOT clause. * * @return The search job keywords. */ public String getKeywords() { checkReady(); return getString("keywords", null); }
/** * Returns the number of previews that have been generated so far for this * job. * * @return The number of previews. */ public int getNumPreviews() { checkReady(); return getInteger("numPreviews"); }
/** * Returns the search string that is sent to every search peer for this job. * * @return The remote search query string. */ public String getRemoteSearch() { checkReady(); return getString("remoteSearch", null); }
/** * 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. The original search should be the "eventSearch" + "reportSearch". * @see #getEventSearch * * @return The reporting search query. */ public String getReportSearch() { checkReady(); return getString("reportSearch", null); }
/** * Returns the {@code InputStream} IO handle for the preview results from * this job. * * @return The preview results {@code InputStream} IO handle. */ public InputStream getResultsPreview() { checkReady(); return getResultsPreview(null); }
/** * Returns a list of search peers that were contacted for this search. * * @return The search peers. */ public String[] getSearchProviders() { checkReady(); return getStringArray("searchProviders", null); } /**
/** * Returns the maximum number of timeline buckets for this job. * * @return The number of timeline buckets. */ public int getStatusBuckets() { checkReady(); return getInteger("statusBuckets"); }
/** * Indicates whether the job failed. * * @return {@code true} if the job failed, {@code false} if not. */ public boolean isFailed() { checkReady(); return getBoolean("isFailed"); }
/** * Indicates whether preview for the job is enabled. * * @return {@code true} if preview is enabled, {@code false} if not. */ public boolean isPreviewEnabled() { checkReady(); return getBoolean("isPreviewEnabled"); }
/** * Indicates whether the job is a real-time search. * * @return {@code true} if the job is a real-time search, {@code false} if * not. */ public boolean isRealTimeSearch() { checkReady(); return getBoolean("isRealTimeSearch"); }
/** * Indicates whether this job was run as a saved search (via scheduler). * * @return {@code true} if the job is from a saved search, {@code false} * if not. */ public boolean isSavedSearch() { checkReady(); return getBoolean("isSavedSearch"); }
/** * Returns the count of event fields. * * @return The number of event fields. */ public int getEventFieldCount() { checkReady(); return getInteger("eventFieldCount"); }
/** * Returns the {@code InputStream} IO handle for the results from this job. * * @return The results {@code InputStream} IO handle. */ public InputStream getResults() { checkReady(); return getResults(null); }
/** * Returns the {@code InputStream} IO handle for the results from this job. * * @param args Optional arguments (see {@link JobResultsArgs}). * @return The results {@code InputStream} IO handle. */ // NOTE: This overload exists primarily to provide better documentation // for the "args" parameter. public InputStream getResults(JobResultsArgs args) { checkReady(); return getResults((Map<String, Object>) args); }
/** * Returns this job's search title. * * @return The search title. */ public String getSearch() { checkReady(); return getTitle(); }
/** * Returns the {@code InputStream} IO handle for the summary for this job. * * @return The summary {@code InputStream} IO handle. */ public InputStream getSummary() { checkReady(); return getSummary(null); }
/** * Indicates whether the process running the search is dead but with the * search not finished. * * @return {@code true} if the job is a zombie, {@code false} if not. */ public boolean isZombie() { checkReady(); return getBoolean("isZombie"); }
/** * Sets this job's priority in the range of 0-10. * * @param value The new priority. */ public void setPriority(int value) { checkReady(); control("setpriority", new Args("priority", value)); }