Package org.elasticsearch.action.bulk
Class BulkItemResponse.Failure
java.lang.Object
org.elasticsearch.action.bulk.BulkItemResponse.Failure
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
- Enclosing class:
- BulkItemResponse
public static class BulkItemResponse.Failure
extends Object
implements Writeable, ToXContentFragment
Represents a failure.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final ConstructingObjectParser<BulkItemResponse.Failure,Void> static final Stringstatic final StringFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionFor write failures before operation was assigned a sequence number.For write failures after operation was assigned a sequence number.Failure(StreamInput in) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionstatic BulkItemResponse.FailurefromXContent(XContentParser parser) getCause()The actual cause of the failure.getId()The id of the action.getIndex()The index name of the action.The failure message.longgetSeqNo()The operation sequence number generated by primary NOTE:SequenceNumbers.UNASSIGNED_SEQ_NOindicates sequence number was not generated by primaryThe rest status.longgetTerm()The operation primary term of the primary NOTE:SequenceNumbers.UNASSIGNED_PRIMARY_TERMindicates primary term was not assigned by primarygetType()The type of the action.booleanWhether this failure is the result of an abort.toString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
INDEX_FIELD
- See Also:
-
TYPE_FIELD
- See Also:
-
ID_FIELD
- See Also:
-
CAUSE_FIELD
- See Also:
-
STATUS_FIELD
- See Also:
-
PARSER
-
-
Constructor Details
-
Failure
For write failures before operation was assigned a sequence number. use @{linkFailure(String, String, String, Exception, long, long)} to record operation sequence no with failure -
Failure
-
Failure
-
Failure
For write failures after operation was assigned a sequence number. -
Failure
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getIndex
The index name of the action. -
getType
The type of the action. -
getId
The id of the action. -
getMessage
The failure message. -
getStatus
The rest status. -
getCause
The actual cause of the failure. -
getSeqNo
public long getSeqNo()The operation sequence number generated by primary NOTE:SequenceNumbers.UNASSIGNED_SEQ_NOindicates sequence number was not generated by primary -
getTerm
public long getTerm()The operation primary term of the primary NOTE:SequenceNumbers.UNASSIGNED_PRIMARY_TERMindicates primary term was not assigned by primary -
isAborted
public boolean isAborted()Whether this failure is the result of an abort. Iftrue, the request to which this failure relates should never be retried, regardless of thecause.- See Also:
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
-
toString
-