org.apache.nutch.storage

## Class ParseStatus

- java.lang.Object
- - org.apache.avro.specific.SpecificRecordBase
  - - org.apache.gora.persistency.impl.PersistentBase
    - - org.apache.nutch.storage.ParseStatus

- All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, java.lang.Comparable<org.apache.avro.specific.SpecificRecord>, org.apache.avro.generic.GenericContainer, org.apache.avro.generic.GenericRecord, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Dirtyable, org.apache.gora.persistency.Persistent
  Direct Known Subclasses:
    ParseStatus.Tombstone

      public class ParseStatus
      extends org.apache.gora.persistency.impl.PersistentBase
      implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent

  A nested container representing parse status data captured from invocation of parsers on fetch of a WebPage
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ParseStatus.Builder` RecordBuilder for ParseStatus instances.
    `static class` | `ParseStatus.Field` Enum containing all data bean's fields.
    `static class` | `ParseStatus.Tombstone`

    - ### Nested classes/interfaces inherited from class org.apache.gora.persistency.impl.PersistentBase

      `org.apache.gora.persistency.impl.PersistentBase.PersistentData`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `_ALL_FIELDS`
    `static org.apache.avro.Schema` | `SCHEMA$`

    - ### Fields inherited from interface org.apache.gora.persistency.Persistent

      `DIRTY_BYTES_FIELD_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParseStatus()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `get(int field$)`
    `java.util.List<java.lang.CharSequence>` | `getArgs()` Gets the value of the 'args' field.
    `int` | `getFieldsCount()` Gets the total field count.
    `java.lang.Integer` | `getMajorCode()` Gets the value of the 'majorCode' field.
    `java.lang.Integer` | `getMinorCode()` Gets the value of the 'minorCode' field.
    `org.apache.avro.Schema` | `getSchema()`
    `ParseStatus.Tombstone` | `getTombstone()`
    `boolean` | `isArgsDirty()` Checks the dirty status of the 'args' field.
    `boolean` | `isMajorCodeDirty()` Checks the dirty status of the 'majorCode' field.
    `boolean` | `isMinorCodeDirty()` Checks the dirty status of the 'minorCode' field.
    `static ParseStatus.Builder` | `newBuilder()` Creates a new ParseStatus RecordBuilder
    `static ParseStatus.Builder` | `newBuilder(ParseStatus.Builder other)` Creates a new ParseStatus RecordBuilder by copying an existing Builder
    `static ParseStatus.Builder` | `newBuilder(ParseStatus other)` Creates a new ParseStatus RecordBuilder by copying an existing ParseStatus instance
    `ParseStatus` | `newInstance()`
    `void` | `put(int field$, java.lang.Object value)`
    `void` | `readExternal(java.io.ObjectInput in)` Reads AVRO data bean from input stream in it s AVRO Binary encoding format to Java object format.
    `void` | `setArgs(java.util.List<java.lang.CharSequence> value)` Sets the value of the 'args' field.
    `void` | `setMajorCode(java.lang.Integer value)` Sets the value of the 'majorCode' field.
    `void` | `setMinorCode(java.lang.Integer value)` Sets the value of the 'minorCode' field.
    `void` | `writeExternal(java.io.ObjectOutput out)` Writes AVRO data bean to output stream in the form of AVRO Binary encoding format.

    - ### Methods inherited from class org.apache.gora.persistency.impl.PersistentBase

      `clear, clearDirty, clearDirty, clearDirty, equals, getDirtyBytes, getUnmanagedFields, isDirty, isDirty, isDirty, setDirty, setDirty, setDirty, setDirtyBytes`

    - ### Methods inherited from class org.apache.avro.specific.SpecificRecordBase

      `compareTo, get, getConverion, getConversion, hashCode, put, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.gora.persistency.Persistent

      `clear, clearDirty, clearDirty, getUnmanagedFields, isDirty, isDirty, setDirty, setDirty, setDirty`

    - ### Methods inherited from interface org.apache.gora.persistency.Dirtyable

      `clearDirty, isDirty`

- - ### Field Detail

    - #### SCHEMA$

          public static final org.apache.avro.Schema SCHEMA$

    - #### _ALL_FIELDS

          public static final java.lang.String[] _ALL_FIELDS

  - ### Constructor Detail

    - #### ParseStatus

          public ParseStatus()

  - ### Method Detail

    - #### getFieldsCount

          public int getFieldsCount()

      Gets the total field count.
      Specified by:
        `getFieldsCount` in class `org.apache.gora.persistency.impl.PersistentBase`
      Returns:
        int field count

    - #### getSchema

          public org.apache.avro.Schema getSchema()

      Specified by:
        `getSchema` in interface `org.apache.avro.generic.GenericContainer`
      Specified by:
        `getSchema` in class `org.apache.avro.specific.SpecificRecordBase`

    - #### get

          public java.lang.Object get(int field$)

      Specified by:
        `get` in interface `org.apache.avro.generic.IndexedRecord`
      Specified by:
        `get` in class `org.apache.avro.specific.SpecificRecordBase`

    - #### put

          public void put(int field$,
                          java.lang.Object value)

      Specified by:
        `put` in interface `org.apache.avro.generic.IndexedRecord`
      Specified by:
        `put` in class `org.apache.avro.specific.SpecificRecordBase`

    - #### getMajorCode

          public java.lang.Integer getMajorCode()

      Gets the value of the 'majorCode' field. Major parsing status' including NOTPARSED (Parsing was not performed), SUCCESS (Parsing succeeded), FAILED (General failure. There may be a more specific error message in arguments.)

    - #### setMajorCode

          public void setMajorCode(java.lang.Integer value)

      Sets the value of the 'majorCode' field. Major parsing status' including NOTPARSED (Parsing was not performed), SUCCESS (Parsing succeeded), FAILED (General failure. There may be a more specific error message in arguments.) * @param value the value to set.

    - #### isMajorCodeDirty

          public boolean isMajorCodeDirty()

      Checks the dirty status of the 'majorCode' field. A field is dirty if it represents a change that has not yet been written to the database. Major parsing status' including NOTPARSED (Parsing was not performed), SUCCESS (Parsing succeeded), FAILED (General failure. There may be a more specific error message in arguments.) * @param value the value to set.

    - #### getMinorCode

          public java.lang.Integer getMinorCode()

      Gets the value of the 'minorCode' field. Minor parsing status' including SUCCESS_OK - Successful parse devoid of anomalies or issues, SUCCESS_REDIRECT - Parsed content contains a directive to redirect to another URL. The target URL can be retrieved from the arguments., FAILED_EXCEPTION - Parsing failed. An Exception occured which may be retrieved from the arguments., FAILED_TRUNCATED - Parsing failed. Content was truncated, but the parser cannot handle incomplete content., FAILED_INVALID_FORMAT - Parsing failed. Invalid format e.g. the content may be corrupted or of wrong type., FAILED_MISSING_PARTS - Parsing failed. Other related parts of the content are needed to complete parsing. The list of URLs to missing parts may be provided in arguments. The Fetcher may decide to fetch these parts at once, then put them into Content.metadata, and supply them for re-parsing., FAILED_MISING_CONTENT - Parsing failed. There was no content to be parsed - probably caused by errors at protocol stage.

    - #### setMinorCode

          public void setMinorCode(java.lang.Integer value)

      Sets the value of the 'minorCode' field. Minor parsing status' including SUCCESS_OK - Successful parse devoid of anomalies or issues, SUCCESS_REDIRECT - Parsed content contains a directive to redirect to another URL. The target URL can be retrieved from the arguments., FAILED_EXCEPTION - Parsing failed. An Exception occured which may be retrieved from the arguments., FAILED_TRUNCATED - Parsing failed. Content was truncated, but the parser cannot handle incomplete content., FAILED_INVALID_FORMAT - Parsing failed. Invalid format e.g. the content may be corrupted or of wrong type., FAILED_MISSING_PARTS - Parsing failed. Other related parts of the content are needed to complete parsing. The list of URLs to missing parts may be provided in arguments. The Fetcher may decide to fetch these parts at once, then put them into Content.metadata, and supply them for re-parsing., FAILED_MISING_CONTENT - Parsing failed. There was no content to be parsed - probably caused by errors at protocol stage. * @param value the value to set.

    - #### isMinorCodeDirty

          public boolean isMinorCodeDirty()

      Checks the dirty status of the 'minorCode' field. A field is dirty if it represents a change that has not yet been written to the database. Minor parsing status' including SUCCESS_OK - Successful parse devoid of anomalies or issues, SUCCESS_REDIRECT - Parsed content contains a directive to redirect to another URL. The target URL can be retrieved from the arguments., FAILED_EXCEPTION - Parsing failed. An Exception occured which may be retrieved from the arguments., FAILED_TRUNCATED - Parsing failed. Content was truncated, but the parser cannot handle incomplete content., FAILED_INVALID_FORMAT - Parsing failed. Invalid format e.g. the content may be corrupted or of wrong type., FAILED_MISSING_PARTS - Parsing failed. Other related parts of the content are needed to complete parsing. The list of URLs to missing parts may be provided in arguments. The Fetcher may decide to fetch these parts at once, then put them into Content.metadata, and supply them for re-parsing., FAILED_MISING_CONTENT - Parsing failed. There was no content to be parsed - probably caused by errors at protocol stage. * @param value the value to set.

    - #### getArgs

          public java.util.List<java.lang.CharSequence> getArgs()

      Gets the value of the 'args' field. Optional arguments supplied to compliment and/or justify the parse status code.

    - #### setArgs

          public void setArgs(java.util.List<java.lang.CharSequence> value)

      Sets the value of the 'args' field. Optional arguments supplied to compliment and/or justify the parse status code. * @param value the value to set.

    - #### isArgsDirty

          public boolean isArgsDirty()

      Checks the dirty status of the 'args' field. A field is dirty if it represents a change that has not yet been written to the database. Optional arguments supplied to compliment and/or justify the parse status code. * @param value the value to set.

    - #### newBuilder

          public static ParseStatus.Builder newBuilder()

      Creates a new ParseStatus RecordBuilder

    - #### newBuilder

          public static ParseStatus.Builder newBuilder(ParseStatus.Builder other)

      Creates a new ParseStatus RecordBuilder by copying an existing Builder

    - #### newBuilder

          public static ParseStatus.Builder newBuilder(ParseStatus other)

      Creates a new ParseStatus RecordBuilder by copying an existing ParseStatus instance

    - #### getTombstone

          public ParseStatus.Tombstone getTombstone()

      Specified by:
        `getTombstone` in interface `org.apache.gora.persistency.Persistent`

    - #### newInstance

          public ParseStatus newInstance()

      Specified by:
        `newInstance` in interface `org.apache.gora.persistency.Persistent`

    - #### writeExternal

          public void writeExternal(java.io.ObjectOutput out)
                             throws java.io.IOException

      Writes AVRO data bean to output stream in the form of AVRO Binary encoding format. This will transform AVRO data bean from its Java object form to it s serializable form.
      Specified by:
        `writeExternal` in interface `java.io.Externalizable`
      Overrides:
        `writeExternal` in class `org.apache.avro.specific.SpecificRecordBase`
      Parameters:
        `out` - java.io.ObjectOutput output stream to write data bean in serializable form
      Throws:
        `java.io.IOException`

    - #### readExternal

          public void readExternal(java.io.ObjectInput in)
                            throws java.io.IOException

      Reads AVRO data bean from input stream in it s AVRO Binary encoding format to Java object format. This will transform AVRO data bean from it s serializable form to deserialized Java object form.
      Specified by:
        `readExternal` in interface `java.io.Externalizable`
      Overrides:
        `readExternal` in class `org.apache.avro.specific.SpecificRecordBase`
      Parameters:
        `in` - java.io.ObjectOutput input stream to read data bean in serializable form
      Throws:
        `java.io.IOException`

Copyright © 2019 The Apache Software Foundation