public long getSeconds() {
    if (!timestampEmpty) {
      return TimestampUtils.millisToSeconds(timestamp.getTime());
    } else if (!bytesEmpty) {
      return TimestampWritable.getSeconds(currentBytes, offset);
    } else {
      throw new IllegalStateException("Both timestamp and bytes are empty");
    }
  }
@return seconds corresponding to this TimestampWritable
serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java