Class BulkItemResponse.Failure

org.elasticsearch.action.bulk.BulkItemResponse.Failure
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment
Enclosing class:
BulkItemResponse

public static class BulkItemResponse.Failure extends implements Writeable, org.elasticsearch.common.xcontent.ToXContentFragment
Represents a failure.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static
     
    static
     
    static
     
    static org.elasticsearch.common.xcontent.ConstructingObjectParser<>
     
    static
     
    static
     

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
     index,  type,  id,  cause)
    For write failures before operation was assigned a sequence number.
     index,  type,  id,  cause, boolean aborted)
     
     index,  type,  id,  cause, long seqNo, long term)
    For write failures after operation was assigned a sequence number.
     index,  type,  id,  cause, RestStatus status)
     
    Read from a stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
     
    The actual cause of the failure.
    The id of the action.
    The index name of the action.
    The failure message.
    long
    The operation sequence number generated by primary NOTE: SequenceNumbers.UNASSIGNED_SEQ_NO indicates sequence number was not generated by primary
    The rest status.
    long
    The operation primary term of the primary NOTE: SequenceNumbers.UNASSIGNED_PRIMARY_TERM indicates primary term was not assigned by primary
    The type of the action.
    boolean
    Whether this failure is the result of an abort.
     
    org.elasticsearch.common.xcontent.XContentBuilder
    toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     
    void
    Write this into the StreamOutput.

    Methods inherited from class java.lang.

    , , , , , , , , ,

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment
  • Field Details

  • Constructor Details

    • Failure

      public Failure( index,  type,  id,  cause)
      For write failures before operation was assigned a sequence number. use @{link Failure(String, String, String, Exception, long, long)} to record operation sequence no with failure
    • Failure

      public Failure( index,  type,  id,  cause, boolean aborted)
    • Failure

      public Failure( index,  type,  id,  cause, RestStatus status)
    • Failure

      public Failure( index,  type,  id,  cause, long seqNo, long term)
      For write failures after operation was assigned a sequence number.
    • Failure

      public Failure(StreamInput in) throws
      Read from a stream.
      Throws:
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
    • getIndex

      public  getIndex()
      The index name of the action.
    • getType

      public  getType()
      The type of the action.
    • getId

      public  getId()
      The id of the action.
    • getMessage

      public  getMessage()
      The failure message.
    • getStatus

      public RestStatus getStatus()
      The rest status.
    • getCause

      public  getCause()
      The actual cause of the failure.
    • getSeqNo

      public long getSeqNo()
      The operation sequence number generated by primary NOTE: SequenceNumbers.UNASSIGNED_SEQ_NO indicates sequence number was not generated by primary
    • getTerm

      public long getTerm()
      The operation primary term of the primary NOTE: SequenceNumbers.UNASSIGNED_PRIMARY_TERM indicates primary term was not assigned by primary
    • isAborted

      public boolean isAborted()
      Whether this failure is the result of an abort. If true, the request to which this failure relates should never be retried, regardless of the cause.
      See Also:
      BulkItemRequest.abort(String, Exception)
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • fromXContent

      public static BulkItemResponse.Failure fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
    • toString

      public  toString()
      Overrides:
       in class