Class TestCurrentHourProvider

java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.TestCurrentHourProvider

@Tag("org.apache.hadoop.hbase.testclassification.RegionServerTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests") public class TestCurrentHourProvider extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final List<String>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    In timezone GMT+08:00, the unix time of 2020-08-20 11:52:41 is 1597895561000 and the unix time of 2020-08-20 15:04:00 is 1597907081000, by calculating the delta time to get expected time in current timezone, then we can get special hour no matter which timezone it runs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • testWithEnvironmentEdge

      @Test public void testWithEnvironmentEdge()
      In timezone GMT+08:00, the unix time of 2020-08-20 11:52:41 is 1597895561000 and the unix time of 2020-08-20 15:04:00 is 1597907081000, by calculating the delta time to get expected time in current timezone, then we can get special hour no matter which timezone it runs.

      In addition, we should consider the Daylight Saving Time. If in DaylightTime, we need reduce one hour.