Class TimePartitionRotation

java.lang.Object
io.deephaven.enterprise.kafkawriter.TimePartitionRotation

public class TimePartitionRotation extends Object
Create functions for generating column partitions from an epoch timestamp.
  • Method Details

    • daily

      @ScriptApi public static LongFunction<String> daily()
      Return a function suitable for creating a daily column partition from nanoseconds since the epoch.

      The default system time zone is used. Times that are more than 30 days in the past or into the future are considered invalid.

      Returns:
      a function that converts a timestamp to a daily column partition
    • hourly

      @ScriptApi public static LongFunction<String> hourly()
      Return a function suitable for creating an hourly column partition from nanoseconds since the epoch.

      The default system time zone is used. Times that are more than 30 days in the past or into the future are considered invalid.

      Returns:
      a function that converts a timestamp to an hourly column partition
    • daily

      @ScriptApi public static LongFunction<String> daily(ZoneId zoneId, int slackHours)
      Return a function suitable for creating a daily column partition from nanoseconds since the epoch.
      Parameters:
      zoneId - the timeZone for conversion
      slackHours - if a time is more than this many hours away from "now", then consider it to be invalid data
      Returns:
      a function that converts a timestamp to a daily column partition
    • hourly

      @ScriptApi public static LongFunction<String> hourly(ZoneId zoneId, int slackHours)
      Return a function suitable for creating an hourly column partition from nanoseconds since the epoch.
      Parameters:
      zoneId - the timeZone for conversion
      slackHours - if a time is more than this many hours away from "now", then consider it to be invalid data
      Returns:
      a function that converts a timestamp to an hourly column partition