Event.CloseEvent (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.inotify, class: Event, class: CloseEvent

Package org.apache.hadoop.hdfs.inotify

# Class Event.CloseEvent

java.lang.Object
org.apache.hadoop.hdfs.inotify.Event
org.apache.hadoop.hdfs.inotify.Event.CloseEvent

Enclosing class:
  Event

@Public public static class Event.CloseEvent extends Event
Sent when a file is closed after append or create.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.inotify.Event

  `Event.AppendEvent, Event.CloseEvent, Event.CreateEvent, Event.EventType, Event.MetadataUpdateEvent, Event.RenameEvent, Event.TruncateEvent, Event.UnlinkEvent`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CloseEvent(String path, long fileSize, long timestamp)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getFileSize()`
  The size of the closed file in bytes.
  `String`
  `getPath()`
  `long`
  `getTimestamp()`
  The time when this event occurred, in milliseconds since the epoch.
  `String`
  `toString()`

  ### Methods inherited from class org.apache.hadoop.hdfs.inotify.Event

  `getEventType`

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

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

- ## Constructor Details

  - ### CloseEvent

    public CloseEvent(String path, long fileSize, long timestamp)

- ## Method Details

  - ### getPath

    public String getPath()

  - ### getFileSize

    public long getFileSize()
    The size of the closed file in bytes. May be -1 if the size is not available (e.g. in the case of a close generated by a concat operation).

  - ### getTimestamp

    public long getTimestamp()
    The time when this event occurred, in milliseconds since the epoch.

  - ### toString

    @Unstable public String toString()
    Overrides:
      `toString` in class `Object`