Class YearSecondTimestamp

  • All Implemented Interfaces:

    public class YearSecondTimestamp
    extends Object
    implements Comparable<YearSecondTimestamp>
    This is a version of a timestamp that breaks down time into a short year, a signed int secondsintoyear and a signed int nanos This is the format that is used internally in the protocol buffers storage plugin. When storing files partitioned by years, the year is dropped from the event, saving two bytes of storage per event. When reconstructing such files, we determine the year from the file name and add it back in.
    • Constructor Detail

      • YearSecondTimestamp

        public YearSecondTimestamp​(short year,
                                   int secondsintoyear,
                                   int nanos)
    • Method Detail

      • getYear

        public short getYear()
      • setYear

        public void setYear​(byte year)
      • getSecondsintoyear

        public int getSecondsintoyear()
      • setSecondsintoyear

        public void setSecondsintoyear​(int secondsintoyear)
      • getNanos

        public int getNanos()
      • setNanos

        public void setNanos​(int nanos)