Enum Class FragmentAttributes

java.lang.Object
java.lang.Enum<FragmentAttributes>
org.apache.nifi.flowfile.attributes.FragmentAttributes
All Implemented Interfaces:
Serializable, Comparable<FragmentAttributes>, Constable, FlowFileAttributeKey

public enum FragmentAttributes extends Enum<FragmentAttributes> implements FlowFileAttributeKey
This enum class contains flow file attribute keys commonly used among Split processors.
  • Enum Constant Details

    • FRAGMENT_SIZE

      public static final FragmentAttributes FRAGMENT_SIZE
      The number of bytes from the original FlowFile that were copied to this FlowFile, including header, if applicable, which is duplicated in each split FlowFile.
    • FRAGMENT_ID

      public static final FragmentAttributes FRAGMENT_ID
      All split FlowFiles produced from the same parent FlowFile will have the same randomly generated UUID added for this attribute.
    • FRAGMENT_INDEX

      public static final FragmentAttributes FRAGMENT_INDEX
      A one-up number that indicates the ordering of the split FlowFiles that were created from a single parent FlowFile.
    • FRAGMENT_COUNT

      public static final FragmentAttributes FRAGMENT_COUNT
      The number of split FlowFiles generated from the parent FlowFile.
    • SEGMENT_ORIGINAL_FILENAME

      public static final FragmentAttributes SEGMENT_ORIGINAL_FILENAME
      The filename of the parent FlowFile.
  • Field Details

    • key

      private final String key
  • Constructor Details

    • FragmentAttributes

      private FragmentAttributes(String key)
  • Method Details

    • values

      public static FragmentAttributes[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FragmentAttributes valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • key

      public String key()
      Specified by:
      key in interface FlowFileAttributeKey
    • copyAttributesToOriginal

      public static FlowFile copyAttributesToOriginal(ProcessSession processSession, FlowFile originalFlowFile, String fragmentId, int fragmentCount)