java.lang.Object
java.lang.Enum<Events>
org.apache.bookkeeper.bookie.storage.directentrylogger.Events
All Implemented Interfaces:
Serializable, Comparable<Events>, Constable

public enum Events extends Enum<Events>
Events.
  • Enum Constant Details

    • FALLOCATE_NOT_AVAILABLE

      public static final Events FALLOCATE_NOT_AVAILABLE
      Fallocate is not available on this host. This generally indicates that the process is running on a non-Linux operating system. The lack of fallocate means that the filesystem will have to do more bookkeeping as data is written to the file, which will slow down writes.
    • ENTRYLOG_IDS_CANDIDATES_SELECTED

      public static final Events ENTRYLOG_IDS_CANDIDATES_SELECTED
      EntryLog ID candidates selected. These are the set entry log ID that subsequent entry log files will use. To find the candidates, the bookie lists all the log ids which have already been used, and finds the longest contiguous block of free ids. Over the lifetime of a bookie, a log id can be reused. This is not a problem, as the ids are only referenced from the index, and an entry log file will not be deleted if there are still references to it in the index. Generally candidates are selected at bookie boot, but they may also be selected at a later time if the current set of candidates is depleted.
    • ENTRYLOGGER_CREATED

      public static final Events ENTRYLOGGER_CREATED
      The entrylogger(EntryLogger) has been created. This occurs during bookie bootup, and the same entry logger will be used for the duration of the bookie process's lifetime.
    • ENTRYLOGGER_MISCONFIGURED

      public static final Events ENTRYLOGGER_MISCONFIGURED
      The entrylogger has been configured in a way that will likely result in errors during operation.
    • LOG_ROLL

      public static final Events LOG_ROLL
      The entrylogger has started writing a new log file. The previous log file may not be entirely flushed when this is called, though they will be after an explicit flush call.
    • LOG_DELETED

      public static final Events LOG_DELETED
      A log file has been deleted. This happens as a result of GC, when all entries in the file belong to deleted ledgers, or compaction, where the live entries have been copied to a new log.
    • READER_CLOSE_ERROR

      public static final Events READER_CLOSE_ERROR
      An error occurred closing an entrylog reader. This is non-fatal but it may leak the file handle and the memory buffer of the reader in question.
    • READ_METADATA_FALLBACK

      public static final Events READ_METADATA_FALLBACK
      An attempt to read entrylog metadata failed. Falling back to scanning the log to get the metadata. This can occur if a bookie crashes before closing the entrylog cleanly.
    • COMPACTION_LOG_CREATED

      public static final Events COMPACTION_LOG_CREATED
      A new entrylog has been created. The filename has the format [dstLogId].compacting, where dstLogId is a new unique log ID. Entrylog compaction will copy live entries from an existing src log to this new compacting destination log. There is a 1-1 relationship between source logs and destination log logs. Once the copy completes, the compacting log will be marked as compacted by renaming the file to [dstLogId].log.[srcLogId].compacted, where srcLogId is the ID of the entrylog from which the live entries were copied. A new hardlink, [dstLogId].log, is created to point to the same inode, making the entry log available to be read. The compaction algorithm then updates the index with the offsets of the entries in the compacted destination log. Once complete, the index is flushed and all intermediate files (links) are deleted along with the original source log file. The entry copying phase of compaction is expensive. The renaming and linking in the algorithm exists so if a failure occurs after copying has completed, the work will not need to be redone.
    • COMPACTION_LOG_RECOVERED

      public static final Events COMPACTION_LOG_RECOVERED
      A partially compacted log has been recovered. The log file is of the format [dstLogId].log.[srcLogId].compacted. The log will be scanned and the index updated with the offsets of the entries in the log. Once complete, the log with ID srcLogId is deleted.

      See COMPACTION_LOG_CREATED for more information on compaction.

    • COMPACTION_MARK_COMPACTED

      public static final Events COMPACTION_MARK_COMPACTED
      A compaction log has been marked as compacted. A log is marked as compacted by renaming from [dstLogId].log to [dstLogId].log.[srcLogId].compacted. All live entries from the src log have been successfully copied to the destination log, at this point.

      See COMPACTION_LOG_CREATED for more information on compaction.

    • COMPACTION_MAKE_AVAILABLE

      public static final Events COMPACTION_MAKE_AVAILABLE
      A compacted log has been made available for reads. A log is made available by creating a hardlink pointing from [dstLogId].log, to [dstLogId].log.[srcLogId].compacted. These files, pointing to the same inode, will continue to exist until the compaction operation is complete.

      A reader with a valid offset will now be able to read from this log, so the index can be updated.

      See COMPACTION_LOG_CREATED for more information on compaction.

    • COMPACTION_COMPLETE

      public static final Events COMPACTION_COMPLETE
      Compaction has been completed for a log. All intermediatory files are deleted, along with the src entrylog file.

      See COMPACTION_LOG_CREATED for more information on compaction.

    • COMPACTION_ABORT_EXCEPTION

      public static final Events COMPACTION_ABORT_EXCEPTION
      Failed to delete files while aborting a compaction operation. While this is not fatal, it can mean that there are issues writing to the filesystem that need to be investigated.
    • COMPACTION_DELETE_FAILURE

      public static final Events COMPACTION_DELETE_FAILURE
      Failed to delete files while completing a compaction operation. While this is not fatal, it can mean that there are issues writing to the filesystem that need to be investigated.
  • Method Details

    • values

      public static Events[] 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 Events 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