Package org.jesterj.ingest.model
Enum Status
- java.lang.Object
-
- java.lang.Enum<Status>
-
- org.jesterj.ingest.model.Status
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BATCHEDThe document is being held for communication to an entity in a batch.DEADTerminal state for resources that generate documents that will never succeed and cannot be processed.DIRTYResource may require re-indexing.DROPPEDThis document was intentionally skipped by the pipeline.ERRORSomething went wrong executing a step, this document may be retried until retry limit is reached.ERROR_DOCSomething went wrong with the document.FORCEResource must be re-indexed.INDEXEDThe document has been accepted by the destination (usually a search index), but may not be searchable until the next commit.INDEXINGThe document is in the process of indexing.PROCESSINGA scanner has picked up resource, and deemed it worthy of processing document is in-flight.RESTARTResource needs reprocessing, Semantically similar to Force but indicates a decision made in the Plan, or by JesterJ itself.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanisStepSpecific()Can this status be set with respect to an outputDestination, or should it affect all destinations remaining on the document.static StatusvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Status[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FORCE
public static final Status FORCE
Resource must be re-indexed. Scanners will always reprocess documents that have this status set. This status would typically be set by an external application or administrator interacting with cassandra directly, to handle special cases such as a document that was declared dead due repeated errors after a misconfiguration of JesterJ or the plan. Once the misconfiguration is fixed, and affected documents have been identified it is best to write a FORCE event to the appropriate table in the keyspace for that scanner in that version of the plan JesterJ never writes force events itself, they only come from external sources.
-
RESTART
public static final Status RESTART
Resource needs reprocessing, Semantically similar to Force but indicates a decision made in the Plan, or by JesterJ itself.
-
DIRTY
public static final Status DIRTY
Resource may require re-indexing. Scanners will look for this state and then decide whether to create a document for processing based on memory and hashing settings.
-
PROCESSING
public static final Status PROCESSING
A scanner has picked up resource, and deemed it worthy of processing document is in-flight. Further processing should continue until another status is set. **WARNING** this status should not be set on an existing document by any processor in the plan. Doing should never be necessary and if done after another step specific status was set could erase the step specific status before it gets persisted. This will be the initial status for child documents however and thus can be set on freshly created child documents.
-
ERROR
public static final Status ERROR
Something went wrong executing a step, this document may be retried until retry limit is reached. This is appropriate when there was an issue contacting an external service or upstream steps might provide different enhancements to the document on the next step somehow.
-
BATCHED
public static final Status BATCHED
The document is being held for communication to an entity in a batch. Commonly used when send to outside systems that are more efficient receiving batches (e.g. Solr).
-
INDEXING
public static final Status INDEXING
The document is in the process of indexing. If the system fails at this point it is unknown whether the document was received at the destination, so for "no more than once" delivery documents stranded in this status will NOT be re-sent on startup. If "at least once delivery" is desired, these documents should be re-sent on startup.
-
INDEXED
public static final Status INDEXED
The document has been accepted by the destination (usually a search index), but may not be searchable until the next commit.
-
DROPPED
public static final Status DROPPED
This document was intentionally skipped by the pipeline. Further processing should be avoided.
-
DEAD
public static final Status DEAD
Terminal state for resources that generate documents that will never succeed and cannot be processed. A human must intervene and evaluate before this can be processed again.
-
ERROR_DOC
public static final Status ERROR_DOC
Something went wrong with the document. A human must intervene and evaluate before this can be processed again. Further processing should be avoided, and stateful Scanners should avoid creating new documents for the resource. This status is similar to DEAD, but no retries were attempted. Examples of where this status is appropriate include XML parsing failure or JSON parsing failure when parsing the original document bytes.
-
-
Method Detail
-
values
public static Status[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Status c : Status.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Status valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
isStepSpecific
public abstract boolean isStepSpecific()
Can this status be set with respect to an outputDestination, or should it affect all destinations remaining on the document. Statuses for which this return true will still be set for all destinations if this status is set in a step with a processor that returns true forDocumentProcessor.isSafe(). Typically, the only status for which that would happen is ERROR. For example if the step is calling out to a service and adding the returned information to the document, that has no outside effects and is thus "safe" but the document information content may be unacceptable for further processing. Also, marking a document indexed from a potent processor that has downstream steps should only mark the destinations relating to the current step and not any downstream steps.- Returns:
- true if this status should be set for a particular destination step that corresponds to the present potent or idempotent processor rather than all destinations.
- See Also:
DocumentImpl.getStatusChange()
-
-